mirror of
https://github.com/misskey-dev/misskey
synced 2024-09-02 15:10:48 +02:00
* 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>
23 lines
555 B
TypeScript
23 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: {},
|
|
},
|
|
};
|
|
});
|