Skip to content

Commit

Permalink
Simplify mock
Browse files Browse the repository at this point in the history
  • Loading branch information
toasted-nutbread committed Dec 17, 2023
1 parent 504dc43 commit 007092c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/database.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ import path from 'path';
import {beforeEach, describe, expect, test, vi} from 'vitest';
import {createDictionaryArchive} from '../dev/util.js';
import {DictionaryDatabase} from '../ext/js/language/dictionary-database.js';
import {DictionaryImporterMediaLoader} from '../ext/js/language/dictionary-importer-media-loader.js';
import {DictionaryImporter} from '../ext/js/language/dictionary-importer.js';
import {DictionaryImporterMediaLoader} from './mocks/dictionary-importer-media-loader.js';

const dirname = path.dirname(fileURLToPath(import.meta.url));

vi.stubGlobal('IDBKeyRange', IDBKeyRange);

vi.mock('../ext/js/language/dictionary-importer-media-loader.js', async () => await import('../test/mocks/dictionary-importer-media-loader.js'));

/**
* @param {string} dictionary
* @param {string} [dictionaryName]
Expand Down

0 comments on commit 007092c

Please sign in to comment.