mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2026-08-04 15:28:58 +00:00
fix tests
Some checks are pending
build / test (macOS-latest) (push) Waiting to run
build / test (ubuntu-latest) (push) Waiting to run
build / test (windows-latest) (push) Waiting to run
build / build-release (push) Blocked by required conditions
build / notify (push) Blocked by required conditions
lint / go-lint (push) Waiting to run
lint / eslint (push) Waiting to run
lint / notify (push) Blocked by required conditions
Some checks are pending
build / test (macOS-latest) (push) Waiting to run
build / test (ubuntu-latest) (push) Waiting to run
build / test (windows-latest) (push) Waiting to run
build / build-release (push) Blocked by required conditions
build / notify (push) Blocked by required conditions
lint / go-lint (push) Waiting to run
lint / eslint (push) Waiting to run
lint / notify (push) Blocked by required conditions
This commit is contained in:
parent
40cc9ccf42
commit
8371be2f08
3 changed files with 13 additions and 3 deletions
|
|
@ -9,7 +9,8 @@ vi.mock('panel/api/generated', () => ({
|
|||
}));
|
||||
|
||||
vi.mock('panel/stores/toasts', () => ({ addErrorToast: vi.fn() }));
|
||||
vi.mock('panel/helpers/constants', () => ({
|
||||
vi.mock('panel/helpers/constants', async (importOriginal) => ({
|
||||
...(await importOriginal<typeof import('panel/helpers/constants')>()),
|
||||
ALL_INTERFACES_IP: '0.0.0.0',
|
||||
INSTALL_FIRST_STEP: 1,
|
||||
STANDARD_DNS_PORT: 53,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
||||
import { translate } from '@adguard/translate';
|
||||
import { LocalStorageHelper } from '../helpers/localStorageHelper';
|
||||
|
||||
// Ensure the real constants module is available even when other test files
|
||||
// (e.g., install-store.test.ts) mock it with a partial stub.
|
||||
vi.mock('panel/helpers/constants', async (importOriginal) =>
|
||||
importOriginal<typeof import('panel/helpers/constants')>(),
|
||||
);
|
||||
|
||||
import {
|
||||
createSolidDefaultValues,
|
||||
solidMessageConstructor,
|
||||
|
|
|
|||
|
|
@ -11,8 +11,10 @@ vi.mock('panel/stores/toasts', () => ({
|
|||
addErrorToast: vi.fn(),
|
||||
}));
|
||||
|
||||
// Mock HTML_PAGES constant.
|
||||
vi.mock('panel/helpers/constants', () => ({
|
||||
// Mock HTML_PAGES constant, but pass through all real exports so
|
||||
// transitive dependencies (e.g., LANGUAGE_QUERY_PARAM in intl) work.
|
||||
vi.mock('panel/helpers/constants', async (importOriginal) => ({
|
||||
...(await importOriginal<typeof import('panel/helpers/constants')>()),
|
||||
HTML_PAGES: { LOGIN: '/login.html', MAIN: '/dashboard.html' },
|
||||
}));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue