Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including sodium-test with all npm packages installed. Try it out:

var sodiumTest = require("sodium-test")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

sodium-test v0.9.0

Test harness for Javascript libsodium implementations

sodium-test

Test harness for Javascript libsodium implementations

npm install sodium-test

Usage

require('sodium-test')(require('sodium-native'))

The above will test that sodium-native passes all the sodium-test tests and write results in TAP format to stdio.

API

harness(sodiumApi)

Will run tests on sodiumApi and assert whether it conforms to the libsodium API. Individual subAPI's can be tested, and all follow the same pattern, eg. require('randombytes_buf')(sodiumApi).

Findings are written to stdio.

License

MIT

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free