0.4.0 • Published 6 years ago
@newerty/transform v0.4.0
CosmosJS
Install
Install with yarn
yarn add --dev @siberianmh/cosmosjsOr npm
npm install --save-dev @siberianmh/cosmosjsUsage
Create file named index.test.js. This will contain our test:
const { describe, it, expect, end } = require('@siberianmh/cosmosjs');
function sum (a, b) {
return a + b;
};
describe('sum', () => {
it('adds 1 + 2 to equal 3', () => {
expect(sum(1, 2)).toBe(3);
})
});
end()Add the following section to your package.json:
{
"scripts": {
"test": "cosmosjs ./index.test.js"
}
}Finally, run yarn test or npm test and Cosmos will print this message:
=> sum
OK adds 1 + 2 to equal 3
...........................................................
Test Summary
Success: 1License
Licensed under the MIT license.