0.2.0 • Published 2 years ago
@happywebworker/cutest v0.2.0
CUTEST
Simple test runner with typescript support
Installation
npm install @happywebworker/cutest --save-dev
Usage
create a test file :
// Animal.test.ts
import { describe, it, assert, log, beforeEach, afterEach } from '@happywebworker/cutest'
describe('Animal', () => {
describe('eat()', () => {
beforeEach(() => {
log('before');
});
afterEach(() => {
log('after');
});
it('should eat', () => {
assert(Animal.hungry)
log('feeding animal...')
Animal.eat()
assert(!Animal.hungry)
log('animal is fed')
})
})
})
then run it with ts-node :
ts-node ./Animal.test.ts