1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Chore: Increase strength of Settings types (#10605)

This commit is contained in:
Henry Heino
2024-06-25 06:01:39 -07:00
committed by GitHub
parent c7116b135f
commit a44412ae78
21 changed files with 1747 additions and 1690 deletions

View File

@@ -1,4 +1,4 @@
import Setting from './models/Setting';
import Setting, { Env } from './models/Setting';
import { reg } from './registry';
const sync = {
@@ -9,7 +9,7 @@ describe('Registry', () => {
let originalSyncTarget: typeof reg.syncTarget;
beforeAll(() => {
Setting.setConstant('env', 'prod');
Setting.setConstant('env', Env.Prod);
originalSyncTarget = reg.syncTarget;
reg.syncTarget = () => ({
isAuthenticated: () => true,
@@ -18,7 +18,7 @@ describe('Registry', () => {
});
afterAll(() => {
Setting.setConstant('env', 'dev');
Setting.setConstant('env', Env.Dev);
reg.syncTarget = originalSyncTarget;
});