You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
704 B
19 lines
704 B
import t from 'tap';
|
|
|
|
import { extractWordsFromFile } from './oooThesaurusParser.js';
|
|
|
|
void t.test('extractWordsFromFile', async (t) => {
|
|
const words = await extractWordsFromFile(
|
|
new URL('../assets/th-en-x-basic.ooo-thesaurus', import.meta.url),
|
|
);
|
|
//console.log(words);
|
|
t.equal(words.length, 24691);
|
|
t.equal(words.includes('afterthought'), true);
|
|
t.equal(words.includes('airplane'), true);
|
|
t.equal(words.includes('another'), true);
|
|
t.equal(words.includes('anybody'), true);
|
|
t.equal(words.includes('anyhow'), true);
|
|
t.equal(words.includes('anyone'), true);
|
|
t.equal(words.includes('anything'), true);
|
|
t.equal(words.includes('anywhere'), true);
|
|
});
|
|
|