diff options
author | 2022-04-24 20:11:21 +0200 | |
---|---|---|
committer | 2022-05-16 00:55:02 +0200 | |
commit | 5725cebec015b90a33c17a8f684bd345dc239934 (patch) | |
tree | 7d248757bc43c25240c59c9cdb0da7bf527e3990 /packages/main/src/reactions/__tests__/synchronizeConfig.spec.ts | |
parent | refactor: reduce service switcher tearing (diff) | |
download | sophie-5725cebec015b90a33c17a8f684bd345dc239934.tar.gz sophie-5725cebec015b90a33c17a8f684bd345dc239934.tar.zst sophie-5725cebec015b90a33c17a8f684bd345dc239934.zip |
chore(deps): remove ms to reduce dependency count
We can trivially do what it does, and removing it reduces the amount
of external dependencies running in the security-sensitive context of
the main process.
Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to 'packages/main/src/reactions/__tests__/synchronizeConfig.spec.ts')
-rw-r--r-- | packages/main/src/reactions/__tests__/synchronizeConfig.spec.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/main/src/reactions/__tests__/synchronizeConfig.spec.ts b/packages/main/src/reactions/__tests__/synchronizeConfig.spec.ts index c145bf3..b5013ea 100644 --- a/packages/main/src/reactions/__tests__/synchronizeConfig.spec.ts +++ b/packages/main/src/reactions/__tests__/synchronizeConfig.spec.ts | |||
@@ -20,7 +20,6 @@ | |||
20 | 20 | ||
21 | import { jest } from '@jest/globals'; | 21 | import { jest } from '@jest/globals'; |
22 | import { mocked } from 'jest-mock'; | 22 | import { mocked } from 'jest-mock'; |
23 | import ms from 'ms'; | ||
24 | 23 | ||
25 | import type ConfigRepository from '../../infrastructure/config/ConfigRepository'; | 24 | import type ConfigRepository from '../../infrastructure/config/ConfigRepository'; |
26 | import SharedStore from '../../stores/SharedStore'; | 25 | import SharedStore from '../../stores/SharedStore'; |
@@ -34,8 +33,8 @@ const repository: ConfigRepository = { | |||
34 | writeConfig: jest.fn(), | 33 | writeConfig: jest.fn(), |
35 | watchConfig: jest.fn(), | 34 | watchConfig: jest.fn(), |
36 | }; | 35 | }; |
37 | const lessThanThrottleMs = ms('0.1s'); | 36 | const lessThanThrottleMs = 100; |
38 | const throttleMs = ms('1s'); | 37 | const throttleMs = 1000; |
39 | 38 | ||
40 | beforeAll(() => { | 39 | beforeAll(() => { |
41 | jest.useFakeTimers(); | 40 | jest.useFakeTimers(); |