Skip to content

Commit

Permalink
fix: non compiling tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Gyoo committed Aug 27, 2024
1 parent 63e3f5a commit 6b538ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions server/src/game-implementations/games/arcaea.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import t from "tap";
import { dmf, mkMockPB, mkMockScore } from "test-utils/misc";
import ResetDBState from "test-utils/resets";
import { TestSnapshot } from "test-utils/single-process-snapshot";
import { TestingArcaeaSheriruthFTR } from "test-utils/test-data";
import { TestingArcaeaSheriruthFTR, TestingWaccaPupaExp } from "test-utils/test-data";

Check warning on line 11 in server/src/game-implementations/games/arcaea.test.ts

View workflow job for this annotation

GitHub Actions / test

'TestingWaccaPupaExp' is defined but never used. Allowed unused vars must match /^_/u
import type { ProvidedMetrics, ScoreData, ScoreDocument, ChartDocument } from "tachi-common";
import type { DeepPartial } from "utils/types";

Expand Down Expand Up @@ -168,10 +168,12 @@ t.test("Arcaea Implementation", (t) => {
});

t.test("Score Validations", (t) => {
const f = (
s: DeepPartial<ScoreDocument<"arcaea:Touch">>,
chart: ChartDocument<"arcaea:Touch"> = TestingArcaeaSheriruthFTR
) => RunValidators(ARCAEA_IMPL.scoreValidators, dmf(mockScore, s), chart);
const f = (s: DeepPartial<ScoreDocument<"arcaea:Touch">>) =>
RunValidators(
ARCAEA_IMPL.scoreValidators,
dmf(mockScore, s),
TestingArcaeaSheriruthFTR
);

t.strictSame(
f({
Expand Down
2 changes: 1 addition & 1 deletion server/src/game-implementations/games/wacca.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ t.test("WACCA Implementation", (t) => {

t.test("Score Validations", (t) => {
const f = (s: DeepPartial<ScoreDocument<"wacca:Single">>) =>
RunValidators(WACCA_IMPL.scoreValidators, dmf(mockScore, s));
RunValidators(WACCA_IMPL.scoreValidators, dmf(mockScore, s), TestingWaccaPupaExp);

t.strictSame(f({ scoreData: { lamp: "ALL MARVELOUS", score: 1_000_000 } }), undefined);
t.strictSame(f({ scoreData: { lamp: "FULL COMBO", judgements: { miss: 0 } } }), undefined);
Expand Down

0 comments on commit 6b538ca

Please sign in to comment.