diff options
Diffstat (limited to 'gui/test')
| -rw-r--r-- | gui/test/components/NotificationArea.spec.tsx | 14 | ||||
| -rw-r--r-- | gui/test/keyframe-animation.spec.ts | 2 | ||||
| -rw-r--r-- | gui/test/relay-settings-builder.spec.ts | 40 |
3 files changed, 14 insertions, 42 deletions
diff --git a/gui/test/components/NotificationArea.spec.tsx b/gui/test/components/NotificationArea.spec.tsx index a0732400da..7be9de56e1 100644 --- a/gui/test/components/NotificationArea.spec.tsx +++ b/gui/test/components/NotificationArea.spec.tsx @@ -15,12 +15,7 @@ describe('components/NotificationArea', () => { latestStable: '2018.2', }; - const defaultExpiry = new AccountExpiry( - moment() - .add(1, 'year') - .format(), - 'en', - ); + const defaultExpiry = new AccountExpiry(moment().add(1, 'year').format(), 'en'); it('handles disconnecting state', () => { for (const reason of ['nothing', 'block'] as AfterDisconnect[]) { @@ -260,12 +255,7 @@ describe('components/NotificationArea', () => { }); it('handles time running low', () => { - const expiry = new AccountExpiry( - moment() - .add(2, 'days') - .format(), - 'en', - ); + const expiry = new AccountExpiry(moment().add(2, 'days').format(), 'en'); const component = shallow( <NotificationArea tunnelState={{ diff --git a/gui/test/keyframe-animation.spec.ts b/gui/test/keyframe-animation.spec.ts index 11eeaf0c54..e3d6e417b0 100644 --- a/gui/test/keyframe-animation.spec.ts +++ b/gui/test/keyframe-animation.spec.ts @@ -2,7 +2,7 @@ import { expect } from 'chai'; import { it, describe } from 'mocha'; import KeyframeAnimation from '../src/main/keyframe-animation'; -describe('lib/keyframe-animation', function() { +describe('lib/keyframe-animation', function () { this.timeout(1000); const newAnimation = () => { diff --git a/gui/test/relay-settings-builder.spec.ts b/gui/test/relay-settings-builder.spec.ts index 009ddfa301..f669d43d2b 100644 --- a/gui/test/relay-settings-builder.spec.ts +++ b/gui/test/relay-settings-builder.spec.ts @@ -4,11 +4,7 @@ import RelaySettingsBuilder from '../src/shared/relay-settings-builder'; describe('Relay settings builder', () => { it('should set location to any', () => { - expect( - RelaySettingsBuilder.normal() - .location.any() - .build(), - ).to.deep.equal({ + expect(RelaySettingsBuilder.normal().location.any().build()).to.deep.equal({ normal: { location: 'any', }, @@ -16,11 +12,7 @@ describe('Relay settings builder', () => { }); it('should bound location to city', () => { - expect( - RelaySettingsBuilder.normal() - .location.city('se', 'mma') - .build(), - ).to.deep.equal({ + expect(RelaySettingsBuilder.normal().location.city('se', 'mma').build()).to.deep.equal({ normal: { location: { only: { @@ -32,11 +24,7 @@ describe('Relay settings builder', () => { }); it('should bound location to country', () => { - expect( - RelaySettingsBuilder.normal() - .location.country('se') - .build(), - ).to.deep.equal({ + expect(RelaySettingsBuilder.normal().location.country('se').build()).to.deep.equal({ normal: { location: { only: { country: 'se' }, @@ -80,27 +68,21 @@ describe('Relay settings builder', () => { }); it('should set location from raw RelayLocation', () => { - expect( - RelaySettingsBuilder.normal() - .location.fromRaw('any') - .build(), - ).to.deep.equal({ + expect(RelaySettingsBuilder.normal().location.fromRaw('any').build()).to.deep.equal({ normal: { location: 'any', }, }); - expect( - RelaySettingsBuilder.normal() - .location.fromRaw({ country: 'se' }) - .build(), - ).to.deep.equal({ - normal: { - location: { - only: { country: 'se' }, + expect(RelaySettingsBuilder.normal().location.fromRaw({ country: 'se' }).build()).to.deep.equal( + { + normal: { + location: { + only: { country: 'se' }, + }, }, }, - }); + ); expect( RelaySettingsBuilder.normal() |
