Skip to content

Commit 2facf36

Browse files
committed
doc: internal/test/binding for testing
1 parent 3ef9562 commit 2facf36

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

doc/guides/writing-tests.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,15 @@ const assert = require('assert');
286286
const freelist = require('internal/freelist');
287287
```
288288

289+
In specific scenarios it may be useful to get a hold of `primordials` or
290+
`internalBinding()`. You can do so using
291+
292+
```console
293+
node --expose-internals -r internal/test/binding lib/fs.js
294+
```
295+
296+
This only works if you preload `internal/test/binding` by command line flag.
297+
289298
### Assertions
290299

291300
When writing assertions, prefer the strict versions:

0 commit comments

Comments
 (0)