Skip to content

Commit

Permalink
test for SlippiGame.getFilePath (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
DustinAlandzes committed Apr 16, 2021
1 parent 71094ee commit dad19c9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/game.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ it("should correctly return metadata", () => {
expect(metadata.playedOn).toBe("dolphin");
});

it("should correctly return file path", () => {
const game = new SlippiGame("slp/test.slp");
expect(game.getFilePath()).toBe("slp/test.slp");

const empty_game = new SlippiGame(new Buffer(""));
expect(empty_game.getFilePath()).toBe(null);
});

it("should be able to read incomplete SLP files", () => {
const game = new SlippiGame("slp/incomplete.slp");
const settings = game.getSettings();
Expand Down

0 comments on commit dad19c9

Please sign in to comment.