Skip to content

Commit

Permalink
code golf
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Jan 24, 2024
1 parent da4f9b4 commit 18cd6ae
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/pgn.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,8 @@ test('make pgn', () => {
});

test('extend mainline', () => {
let game: Game<PgnNodeData> = defaultGame(emptyHeaders);
const mainline = 'e4 d5 a3 h6 Bg5'.split(' ').map(san => {
return {
san: san,
};
});
const game: Game<PgnNodeData> = defaultGame(emptyHeaders);
const mainline = 'e4 d5 a3 h6 Bg5'.split(' ').map(san => ({ san }));
extendMainline(game, mainline);
expect(makePgn(game)).toEqual('1. e4 d5 2. a3 h6 3. Bg5 *\n');
});
Expand Down

0 comments on commit 18cd6ae

Please sign in to comment.