Serum uses injection to simplify your async tests.
Install
npm install --save-dev serum
Or
yarn add --dev serum
Use
test `a serum` `has many tests within it` to `accepts tests as tagged template literals` to x `disables tests with .x` to test `supports nesting` test `to any depth` test `so we could keep going` test `and going` `until we test something` to end end end end test `injection —` `x` 128 `injects immediate values by their argument name` to `name with spaces` 'hi there' `converts spaces to underscores` to `a promise` Promise `resolves promises before injection` to `a function` Promise `calls functions and resolves their results before injection` to endend
You need to run your test with a test runner, like mocha
or jasmine
.
Configuration
By default, serum wires itself up to global.describe
, global.it
, and global.xit
.
This works for most test runners, but if you want something different, you can do that
by calling .config
when you require
it:
const lab = // Using the lab test runner const test =