Skip to content

Commit

Permalink
converter test
Browse files Browse the repository at this point in the history
  • Loading branch information
mdirolf committed Feb 10, 2025
1 parent 440eab3 commit 07f2382
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/__tests__/converter.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { DBPuzzleT } from '../lib/dbtypes.js';
import { Timestamp } from '../lib/timestamp.js';
import { PuzzleInProgressStrictT } from '../lib/types.js';
import { fromCells } from '../lib/viewableGrid.js';
import { getClueProps } from '../reducers/reducer.js';
import { getClueProps } from '../reducers/builderReducer.js';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand Down Expand Up @@ -118,11 +118,13 @@ cases(
if (!loaded) {
throw new Error('BAD');
}
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const simplifiedClues = Object.fromEntries(
Object.entries(loaded.clues).map(([entry, clues]) =>
clues.length === 1 && clues[0] ? [entry, clues[0]] : [entry, clues]
)
);
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
expect({ ...loaded, clues: simplifiedClues }).toMatchSnapshot();
},
CASES
Expand Down
1 change: 0 additions & 1 deletion app/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const customJestConfig = {
'<rootDir>/__tests__/Puzzle.test.tsx',
'<rootDir>/__tests__/upload.test.tsx',
'<rootDir>/__tests__/edit.test.tsx',
'<rootDir>/__tests__/converter.test.tsx',
'<rootDir>/__tests__/analytics.test.ts',
'<rootDir>/__tests__/stats.test.ts',
'<rootDir>/__tests__/notifications.test.ts',
Expand Down

0 comments on commit 07f2382

Please sign in to comment.