mirror of
https://github.com/photoprism/photoprism.git
synced 2026-01-23 02:24:24 +00:00
Tests: update Vitest $notify mock to use vi.fn() and include info method.
This commit is contained in:
parent
9d17de55e3
commit
fd9ee97c67
1 changed files with 9 additions and 9 deletions
|
|
@ -30,9 +30,9 @@ if (typeof global.ResizeObserver === "undefined") {
|
|||
constructor(callback) {
|
||||
this.callback = callback;
|
||||
}
|
||||
observe() {}
|
||||
unobserve() {}
|
||||
disconnect() {}
|
||||
observe() { }
|
||||
unobserve() { }
|
||||
disconnect() { }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -54,22 +54,22 @@ config.global.mocks = {
|
|||
$event: {
|
||||
subscribe: () => "sub-id",
|
||||
subscribeOnce: () => "sub-id-once",
|
||||
unsubscribe: () => {},
|
||||
publish: () => {},
|
||||
unsubscribe: () => { },
|
||||
publish: () => { },
|
||||
},
|
||||
$view: {
|
||||
enter: () => {},
|
||||
leave: () => {},
|
||||
enter: () => { },
|
||||
leave: () => { },
|
||||
isActive: () => true,
|
||||
},
|
||||
$notify: { success: () => {}, error: () => {}, warn: () => {} },
|
||||
$notify: { success: vi.fn(), error: vi.fn(), warn: vi.fn(), info: vi.fn() },
|
||||
$fullscreen: {
|
||||
isSupported: () => true,
|
||||
isEnabled: () => false,
|
||||
request: () => Promise.resolve(),
|
||||
exit: () => Promise.resolve(),
|
||||
},
|
||||
$clipboard: { selection: [], has: () => false, toggle: () => {} },
|
||||
$clipboard: { selection: [], has: () => false, toggle: () => { } },
|
||||
$util: {
|
||||
hasTouch: () => false,
|
||||
encodeHTML: (s) => s,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue