fix script constructor array check

This commit is contained in:
Wei Lu 2014-03-17 16:13:49 +08:00
parent b93a774414
commit 9f2da415ea
2 changed files with 6 additions and 5 deletions

View file

@ -7,11 +7,12 @@ describe('Script', function() {
assert.ok(new Script([]))
})
it('works when nothing is passed in', function() {
assert.ok(new Script())
})
it('throws an error when input is not an array', function() {
assert.throws(function(){
new Script({})
})
assert.throws(function(){ new Script({}) })
})
})
})