A testing library that helps you test your code in a more efficient way.
This library is still in development and is not ready for production use.
$ npm install --save niicode-test
- Create a test file named
test.js
in the root of your project. - Import the
test
function fromniicode-test
and use it to test your code.
const { test, describe, expect } = require('niicode-test/module/test.js');
describe('test', () => {
test('should return true', () => {
expect(true).toBe(true);
});
});
- In your package.json file, add a
test
script that runs thetest.js
file.
{
"scripts": {
"test": "node ${name of your test file}"
}
}
$ npm test
Type: function
Type:
string
The name of the test.
Type:
function
Returns:
void
- Fork this repository on GitHub. Fork
- Clone your forked repository to your local machine.
- Create a new branch for your changes.
- Make your changes.
- Commit your changes.
- Push your changes to your forked repository.
- Create a pull request.
- Wait for your pull request to be reviewed and merged.
- Celebrate! 🎉
MIT © niicode