• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

project-slippi / slippi-js / 19753474081

28 Nov 2025 03:45AM UTC coverage: 81.336% (+0.08%) from 81.254%
19753474081

Pull #150

github

web-flow
Merge 7b34002d4 into 30fdf9839
Pull Request #150: Refactor SlippiGame to be web-compatible by default

694 of 928 branches covered (74.78%)

Branch coverage included in aggregate %.

158 of 178 new or added lines in 16 files covered. (88.76%)

1960 of 2335 relevant lines covered (83.94%)

119971.77 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.24
/src/node/SlippiGameNode.ts
1
import { SlippiGameBase } from "../common/SlippiGameBase";
12✔
2
import type { StatOptions } from "../common/stats";
3
import { type BinaryLike, isBufferLike } from "../common/utils/bufferHelpers";
12✔
4
import { SlpBufferInputRef } from "../common/utils/slpInputRef";
12✔
5
import { SlpFileInputRef } from "./utils/slpFileInputRef";
12✔
6

7
export class SlippiGameNode extends SlippiGameBase {
12✔
8
  private readonly filePath: string | null;
9

10
  public constructor(input: string | BinaryLike, opts?: StatOptions) {
11
    if (typeof input === "string") {
79✔
12
      super(new SlpFileInputRef(input), opts);
75✔
13
      this.filePath = input;
75✔
14
    } else if (isBufferLike(input)) {
4!
15
      super(new SlpBufferInputRef(input), opts);
4✔
16
      this.filePath = null;
4✔
17
    } else {
NEW
18
      throw new Error("Cannot create SlippiGame with input of that type");
×
19
    }
20
  }
21

22
  public override getFilePath(): string | null {
23
    return this.filePath;
2✔
24
  }
25
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc