File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1010 "build" : " tsc --incremental" ,
1111 "watch" : " tsc --build --watch" ,
1212 "lint" : " oxlint --type-aware" ,
13- "validate" : " npm run format:check && npm run lint" ,
13+ "validate" : " npm run format:check && npm run test && npm run lint" ,
1414 "seed" : " NODE_ENV=development tsx src/scripts/seed.ts" ,
1515 "test" : " vitest run"
1616 },
Original file line number Diff line number Diff line change 11import { readFileSync } from "node:fs" ;
22import { expect , test } from "vitest" ;
33
4- const wordleWords : string [ ] = readFileSync ( "data/wordle.txt" , "utf-8" ) . trim ( ) . split ( "\n" ) ;
4+ // remove \r for windows
5+ const wordleWords : string [ ] = readFileSync ( "data/wordle.txt" , "utf-8" ) . trim ( ) . replaceAll ( "\r" , "" ) . split ( "\n" ) ;
56
6- const wordleGuesses : string [ ] = readFileSync ( "data/wordle_guesses.txt" , "utf-8" ) . trim ( ) . split ( "\n" ) ;
7+ const wordleGuesses : string [ ] = readFileSync ( "data/wordle_guesses.txt" , "utf-8" ) . trim ( ) . replaceAll ( "\r" , "" ) . split ( "\n" ) ;
78
89test ( "wordle.txt - every word should be 5 characters and lowercase" , ( ) => {
910 for ( const word of wordleWords ) {
You can’t perform that action at this time.
0 commit comments