From fe47a77fabd02e2cbd74a9d691ba7b1a50ca7ed7 Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Fri, 8 Nov 2024 17:49:34 -0500 Subject: [PATCH] Fix test --- .../outline_server_repository.spec.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/client/src/www/app/outline_server_repository/outline_server_repository.spec.ts b/client/src/www/app/outline_server_repository/outline_server_repository.spec.ts index 4b5c167ed9..e28c0b9b32 100644 --- a/client/src/www/app/outline_server_repository/outline_server_repository.spec.ts +++ b/client/src/www/app/outline_server_repository/outline_server_repository.spec.ts @@ -21,6 +21,7 @@ import { ServersStorageV1, serversStorageV0ConfigToAccessKey, } from '.'; +import * as config from './config'; import {OutlineServer} from './server'; import {FakeVpnApi} from './vpn.fake'; import { @@ -341,13 +342,13 @@ describe('OutlineServerRepository', () => { it('validates static access keys', () => { const repo = newTestRepo(new EventQueue(), new InMemoryStorage()); // Invalid access keys. - expect(() => repo.validateAccessKey('')).toThrowError(ServerUrlInvalid); - expect(() => repo.validateAccessKey('ss://invalid')).toThrowError( + expect(() => config.validateAccessKey('')).toThrowError(ServerUrlInvalid); + expect(() => config.validateAccessKey('ss://invalid')).toThrowError( ServerUrlInvalid ); // IPv6 host. expect(() => - repo.validateAccessKey( + config.validateAccessKey( SIP002_URI.stringify( makeConfig({ host: '2001:0:ce49:7601:e866:efff:62c3:fffe', @@ -360,7 +361,7 @@ describe('OutlineServerRepository', () => { ).toBeTruthy(); // Unsupported ciphers. expect(() => - repo.validateAccessKey( + config.validateAccessKey( SIP002_URI.stringify( makeConfig({ host: '127.0.0.1', @@ -372,7 +373,7 @@ describe('OutlineServerRepository', () => { ) ).toThrowError(ShadowsocksUnsupportedCipher); expect(() => - repo.validateAccessKey( + config.validateAccessKey( SIP002_URI.stringify( makeConfig({ host: '127.0.0.1',