commit d67bdcab16825896ab7ad36806a6dffcd1efe62e
parent f19d82ace4ffafe5015d6718f56f4c65b77174fc
Author: Jared Tobin <jared@jtobin.io>
Date: Sat, 3 Nov 2018 13:13:43 +1300
Assert clan/sein throw on bad input.
Diffstat:
1 file changed, 19 insertions(+), 0 deletions(-)
diff --git a/test/co.test.js b/test/co.test.js
@@ -159,6 +159,15 @@ describe('clan/sein', () => {
expect(clan('~dozryt--wolmep-racmyl-padpeg-mocryp')).to.equal('comet')
})
+ it('clan throws on invalid input', () => {
+ let input = () => clan('~zord')
+ expect(input).to.throw()
+ input = () => clan('zod')
+ expect(input).to.throw()
+ input = () => clan('~nid-tomdun')
+ expect(input).to.throw()
+ })
+
it('sein works as expected', () => {
expect(sein('~zod')).to.equal('~zod')
expect(sein('~nec')).to.equal('~nec')
@@ -169,5 +178,15 @@ describe('clan/sein', () => {
expect(sein('~nidsut-tomdun')).to.equal('~marzod')
expect(sein('~sansym-ribnux')).to.equal('~marnec')
})
+
+ it('sein throws on invalid input', () => {
+ let input = () => sein('~zord')
+ expect(input).to.throw()
+ input = () => sein('zod')
+ expect(input).to.throw()
+ input = () => sein('~nid-tomdun')
+ expect(input).to.throw()
+ })
+
})