mirror of
https://github.com/mastodon/mastodon.git
synced 2025-11-27 18:10:58 +00:00
fix test type bug, and code split emoji initialization
This commit is contained in:
parent
5391275c83
commit
8bd3af4283
|
|
@ -162,7 +162,7 @@ describe('loadEmojiDataToState', () => {
|
||||||
const dbCall = vi
|
const dbCall = vi
|
||||||
.spyOn(db, 'loadEmojiByHexcode')
|
.spyOn(db, 'loadEmojiByHexcode')
|
||||||
.mockRejectedValue(new db.LocaleNotLoadedError('en'));
|
.mockRejectedValue(new db.LocaleNotLoadedError('en'));
|
||||||
vi.spyOn(loader, 'importEmojiData').mockResolvedValueOnce();
|
vi.spyOn(loader, 'importEmojiData').mockResolvedValueOnce(undefined);
|
||||||
const consoleCall = vi
|
const consoleCall = vi
|
||||||
.spyOn(console, 'warn')
|
.spyOn(console, 'warn')
|
||||||
.mockImplementationOnce(() => null);
|
.mockImplementationOnce(() => null);
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import { me, reduceMotion } from 'mastodon/initial_state';
|
||||||
import ready from 'mastodon/ready';
|
import ready from 'mastodon/ready';
|
||||||
import { store } from 'mastodon/store';
|
import { store } from 'mastodon/store';
|
||||||
|
|
||||||
import { initializeEmoji } from './features/emoji';
|
|
||||||
import { isProduction, isDevelopment } from './utils/environment';
|
import { isProduction, isDevelopment } from './utils/environment';
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
|
|
@ -30,6 +29,7 @@ function main() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { initializeEmoji } = await import('./features/emoji/index');
|
||||||
initializeEmoji();
|
initializeEmoji();
|
||||||
|
|
||||||
const root = createRoot(mountNode);
|
const root = createRoot(mountNode);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user