Skip to content

Commit 37ff9ea

Browse files
committed
add test case for type check
1 parent d7b10f5 commit 37ff9ea

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

test/types.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
var test = require('tape')
2+
var inject = require('../index.js')
3+
4+
test('invalid first argument', function (t) {
5+
t.plan(1)
6+
t.throws(function () {
7+
var result = inject({ is: 'object' }, 'try', 1)
8+
})
9+
})
10+
11+
test('invalid third argument', function (t) {
12+
t.plan(1)
13+
t.throws(function () {
14+
var result = inject('validstring', 'try', 'index')
15+
})
16+
})

0 commit comments

Comments
 (0)