mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-20 01:55:26 -05:00
Add comp analyzer range comparison test
This commit is contained in:
22
app/features/comp-analyzer/core/weapon-range.test.ts
Normal file
22
app/features/comp-analyzer/core/weapon-range.test.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { describe, expect, test } from "vitest";
|
||||
import type { MainWeaponId } from "~/modules/in-game-lists/types";
|
||||
import { getWeaponsWithRange } from "./weapon-range";
|
||||
|
||||
// [longerRangeWeaponId, shorterRangeWeaponId]
|
||||
const RANGE_COMPARISONS: [MainWeaponId, MainWeaponId][] = [
|
||||
[220, 210], // Range Blaster > Blaster
|
||||
[70, 40], // Splattershot Pro > Splattershot
|
||||
// [2020, 7030], // Splatterscope > Wellstring V TODO: a failing case
|
||||
// [2070, 7010], // Snipewriter 5H > Tri-Stringer TODO: a failing case
|
||||
];
|
||||
|
||||
describe("weapon range comparisons", () => {
|
||||
test.each(
|
||||
RANGE_COMPARISONS,
|
||||
)("weapon %i has more range than weapon %i", (longerId, shorterId) => {
|
||||
const [longer] = getWeaponsWithRange([longerId]);
|
||||
const [shorter] = getWeaponsWithRange([shorterId]);
|
||||
|
||||
expect(longer.range).toBeGreaterThan(shorter.range);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user