diff options
| author | Andrej Mihajlov <and@codeispoetry.ru> | 2017-02-28 12:29:52 +0000 |
|---|---|---|
| committer | Andrej Mihajlov <and@codeispoetry.ru> | 2017-02-28 12:29:52 +0000 |
| commit | 68eb65210dabde8bc138f3d99d85bc93cba5eab4 (patch) | |
| tree | ce577f49633fbb4d86f4b77961f5524ecb63dde3 /test/lib | |
| parent | bc060f9c4028c2b9624754cda61000f47fa631c9 (diff) | |
| download | mullvadvpn-68eb65210dabde8bc138f3d99d85bc93cba5eab4.tar.xz mullvadvpn-68eb65210dabde8bc138f3d99d85bc93cba5eab4.zip | |
Rearrange tests and add missing ones
Diffstat (limited to 'test/lib')
| -rw-r--r-- | test/lib/enum.spec.js | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/test/lib/enum.spec.js b/test/lib/enum.spec.js deleted file mode 100644 index 20de191d08..0000000000 --- a/test/lib/enum.spec.js +++ /dev/null @@ -1,26 +0,0 @@ -import { expect } from 'chai'; -import Enum from '../../app/lib/enum'; - -describe('lib', () => { - - describe('enum', () => { - it('should be able to compare values', () => { - const e = Enum('NORTH', 'SOUTH', 'WEST', 'EAST'); - expect(e.NORTH).to.be.equal('NORTH'); - }); - - it('should not be able to modify enum', () => { - let e = Enum('NORTH', 'SOUTH', 'WEST', 'EAST'); - expect(() => e.ANYWHERE = 'ANYWHERE').to.throw(); - }); - - it('should be able to validate enum keys', () => { - let e = Enum('NORTH', 'SOUTH', 'WEST', 'EAST'); - expect(e.isValid('SOUTH')).to.be.true; - expect(e.isValid('ANYWHERE')).to.be.false; - expect(e.isValid()).to.be.false; - expect(e.isValid(null)).to.be.false; - }); - }); - -}); |
