X Tutup
The Wayback Machine - https://web.archive.org/web/20220320160114/https://github.com/nodejs/node/commit/f52c92134c
Skip to content
Permalink
Browse files
doc: internal/test/binding for testing
PR-URL: #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>
  • Loading branch information
bmeck authored and Trott committed Apr 6, 2021
1 parent ab42ef3 commit f52c92134c28ff5758d1bda41efb826169daa5ad
Showing with 9 additions and 0 deletions.
  1. +9 −0 doc/guides/writing-tests.md
@@ -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:

0 comments on commit f52c921

Please sign in to comment.
X Tutup