UNPKG

wordle-shell

Version:

A Wordle for the command line

17 lines (13 loc) 493 B
import WordPicker, { Langs } from "../WordPicker"; const dates = [ { date: new Date("2022-03-03"), word: "JUNHO" }, { date: new Date("2047-06-03"), word: "TUSTA" }, { date: new Date("2027-12-23"), word: "PUPES" }, ]; test('Always pick the same word in the same day', () => { dates.forEach(({ date, word }) => { jest.useFakeTimers().setSystemTime(date.getTime()); const wp = new WordPicker(Langs.ptBr); expect(wp.getWord()).toEqual(word); }); });