diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2021-06-29 15:09:04 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2021-07-01 11:37:59 +0200 |
| commit | d8ef9a4b86d402d3d4191c0275f6f1007f3eeb1b (patch) | |
| tree | a05e106ba78eb1c9a9f856af9b6498acd4db35dd /gui/test | |
| parent | 93f6361d14031d9644d6677c8eb51bf67e288666 (diff) | |
| download | mullvadvpn-d8ef9a4b86d402d3d4191c0275f6f1007f3eeb1b.tar.xz mullvadvpn-d8ef9a4b86d402d3d4191c0275f6f1007f3eeb1b.zip | |
Removed now unused transition rules and helper methods
Diffstat (limited to 'gui/test')
| -rw-r--r-- | gui/test/transition-rule.spec.ts | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/gui/test/transition-rule.spec.ts b/gui/test/transition-rule.spec.ts deleted file mode 100644 index 6896370d21..0000000000 --- a/gui/test/transition-rule.spec.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { expect } from 'chai'; -import { it, describe } from 'mocha'; -import TransitionRule from '../src/renderer/lib/transition-rule'; - -describe('TransitionRule', () => { - const testTransition = { - forward: { name: 'forward', duration: 0.25 }, - backward: { name: 'backward', duration: 0.25 }, - }; - - it('should match wildcard rule', () => { - const rule = new TransitionRule(null, '/route', testTransition); - - expect(rule.match(null, '/route')).to.deep.equal({ - direction: 'forward', - descriptor: { name: 'forward', duration: 0.25 }, - }); - - expect(rule.match('/somewhere', '/route')).to.deep.equal({ - direction: 'forward', - descriptor: { name: 'forward', duration: 0.25 }, - }); - }); - - it('should match wildcard rule reversion', () => { - const rule = new TransitionRule(null, '/route', testTransition); - - expect(rule.match('/route', '/other')).to.deep.equal({ - direction: 'backward', - descriptor: { name: 'backward', duration: 0.25 }, - }); - }); - - it('should match exact rule', () => { - const rule = new TransitionRule('/route1', '/route2', testTransition); - - expect(rule.match('/other', '/route1')).to.be.null; - expect(rule.match('/other', '/route2')).to.be.null; - - expect(rule.match('/route1', '/route2')).to.deep.equal({ - direction: 'forward', - descriptor: { name: 'forward', duration: 0.25 }, - }); - }); - - it('should match exact rule reversion', () => { - const rule = new TransitionRule('/route1', '/route2', testTransition); - - expect(rule.match('/route1', '/other')).to.be.null; - expect(rule.match('/route2', '/other')).to.be.null; - - expect(rule.match('/route2', '/route1')).to.deep.equal({ - direction: 'backward', - descriptor: { name: 'backward', duration: 0.25 }, - }); - }); -}); |
