You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Muthu Kumar
e447b2f014
|
6 years ago | |
---|---|---|
assets | 6 years ago | |
gunner | 6 years ago | |
util | 6 years ago | |
.eslintrc.js | 6 years ago | |
.gitignore | 6 years ago | |
README.md | 6 years ago | |
index.js | 6 years ago | |
package.json | 6 years ago | |
sample.test.js | 6 years ago | |
shrinkwrap.yaml | 6 years ago |
README.md
Gunner
Tiny, but fully loaded.
Gunner is a zero magic, fast test-runner and assertion framework. There are no magic globals or CLI specific interface.
Usage
Create a new Gunner
instance and simply write your tests. The assertion methods are passed in as the callback to the test function.
const gunner = new Gunner();
gunner.test('arrays are equal', expect => {
return expect([1, 2,]).deepEqual([1 ,2]);
});
gunner.run();
API
new Gunner(options)
Gunner#test(title, implementation)
Gunner#run(options)
Gunner constructor
Creates a new Gunner instance.
Usage
const gunner = new Gunner(options);
Gunner#test
Registers a new test.
Usage
gunner.test('sum should equal 3', expect => {
const sum = 1 + 2;
return expect(sum).equal(3);
});
Gunner#run
Starts running Gunner tests.
Usage
gunner.run(options);