mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-23 17:45:12 +00:00
c091d9e6d5
* feat(frontend/MkUrlPreview): oEmbedのサポート * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * playerとoEmbedの統合 * Update CHANGELOG.md * loading=lazyはここでは不要 * border: 0 * プレビュー直後にautoplayできる機能の復旧 * add test * refactor test * explain about cache * expandPreviewはもう使わない * summaly v4 * update summaly * scrolling=no to fix pixiv --------- Co-authored-by: tamaina <tamaina@hotmail.co.jp>
22 lines
555 B
TypeScript
22 lines
555 B
TypeScript
import { vi } from 'vitest';
|
|
import createFetchMock from 'vitest-fetch-mock';
|
|
|
|
const fetchMocker = createFetchMock(vi);
|
|
fetchMocker.enableMocks();
|
|
|
|
// Set i18n
|
|
import locales from '../../../locales';
|
|
import { updateI18n } from '@/i18n';
|
|
updateI18n(locales['en-US']);
|
|
|
|
// XXX: misskey-js panics if WebSocket is not defined
|
|
vi.stubGlobal('WebSocket', class WebSocket extends EventTarget { static CLOSING = 2; });
|
|
|
|
// XXX: defaultStore somehow becomes undefined in vitest?
|
|
vi.mock('@/store.js', () => {
|
|
return {
|
|
defaultStore: {
|
|
state: {},
|
|
},
|
|
};
|
|
});
|