mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
doc: internal/test/binding for testing
PR-URL: https://github.com/nodejs/node/pull/38026 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
committed by
Rich Trott
parent
ab42ef3930
commit
f52c92134c
@@ -286,6 +286,15 @@ const assert = require('assert');
|
||||
const freelist = require('internal/freelist');
|
||||
```
|
||||
|
||||
In specific scenarios it may be useful to get a hold of `primordials` or
|
||||
`internalBinding()`. You can do so using
|
||||
|
||||
```console
|
||||
node --expose-internals -r internal/test/binding lib/fs.js
|
||||
```
|
||||
|
||||
This only works if you preload `internal/test/binding` by command line flag.
|
||||
|
||||
### Assertions
|
||||
|
||||
When writing assertions, prefer the strict versions:
|
||||
|
||||
Reference in New Issue
Block a user