summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@codeispoetry.ru>2017-02-13 16:39:16 +0000
committerAndrej Mihajlov <and@codeispoetry.ru>2017-02-13 16:39:16 +0000
commit91c10ffcf4c0577507970d71f1d21f4a7de51196 (patch)
tree219391f63056dd7e3495a9decd57663a0a454650 /test
parent958f44741b463ba1437826e91da7c75c44cc28b9 (diff)
downloadmullvadvpn-91c10ffcf4c0577507970d71f1d21f4a7de51196.tar.xz
mullvadvpn-91c10ffcf4c0577507970d71f1d21f4a7de51196.zip
Simulate login
Diffstat (limited to 'test')
-rw-r--r--test/lib/enum.spec.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/lib/enum.spec.js b/test/lib/enum.spec.js
new file mode 100644
index 0000000000..04e1015f42
--- /dev/null
+++ b/test/lib/enum.spec.js
@@ -0,0 +1,16 @@
+import { expect } from 'chai';
+import Enum from '../../app/lib/enum';
+
+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();
+ });
+
+});