Skip to content

Commit

Permalink
test: bump coverage to 100%
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshuawuyts committed May 11, 2015
1 parent 60d20b2 commit 6189b52
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
},
"devDependencies": {
"istanbul": "^0.3.13",
"noop2": "^1.0.1",
"standard": "^3.7.3",
"tape": "^4.0.0"
},
Expand Down
10 changes: 5 additions & 5 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
const noop = require('noop2')
const test = require('tape')
const fsm = require('./')

noop()

test('should validate input states', function (t) {
t.plan(2)

Expand All @@ -26,7 +29,7 @@ test('m.on() should attach events', function (t) {
DOWN: {up: 'UP'}
})

m.on('UP', function () {})
m.on('UP', noop)
t.equal(typeof m._emitter._events.UP, 'function')
})

Expand Down Expand Up @@ -77,11 +80,8 @@ test('m.emit() should emit enter events', function (t) {
t.pass('UP')
})

m.on('null:leave', function () {
t.fail('leave called')
})

m.emit('UP')
m.emit('DOWN')
})

test('m.emit() should emit events in sequence', function (t) {
Expand Down

0 comments on commit 6189b52

Please sign in to comment.