Compare commits

..

No commits in common. "6866248b411111c04bdfef8c5281c208cc89d707" and "e968063eaa8d0d5fa447a5a831286fea47f80912" have entirely different histories.

3 changed files with 7 additions and 7 deletions

View File

@ -133,7 +133,7 @@ declare module "vitest" {
/** /**
* Check whether a {@linkcode Pokemon} has applied a specific {@linkcode AbilityId}. * Check whether a {@linkcode Pokemon} has applied a specific {@linkcode AbilityId}.
* @param expectedAbilityId - The expected {@linkcode AbilityId} to check for * @param expectedAbilityId - The expected {@linkcode AbilityId} to
*/ */
toHaveAbilityApplied(expectedAbilityId: AbilityId): void; toHaveAbilityApplied(expectedAbilityId: AbilityId): void;

View File

@ -1,10 +1,9 @@
// biome-ignore-start lint/correctness/noUnusedImports: TSDoc
import type { GameManager } from "#test/test-utils/game-manager";
// biome-ignore-end lint/correctness/noUnusedImports: TSDoc
import type { SerializedPositionalTag, serializedPosTagMap } from "#data/positional-tags/load-positional-tag"; import type { SerializedPositionalTag, serializedPosTagMap } from "#data/positional-tags/load-positional-tag";
import type { PositionalTagType } from "#enums/positional-tag-type"; import type { PositionalTagType } from "#enums/positional-tag-type";
import type { OneOther } from "#test/@types/test-helpers"; import type { OneOther } from "#test/@types/test-helpers";
// biome-ignore-start lint/correctness/noUnusedImports: TSDoc
import type { GameManager } from "#test/test-utils/game-manager";
// biome-ignore-end lint/correctness/noUnusedImports: TSDoc
import { getOnelineDiffStr } from "#test/test-utils/string-utils"; import { getOnelineDiffStr } from "#test/test-utils/string-utils";
import { isGameManagerInstance, receivedStr } from "#test/test-utils/test-utils"; import { isGameManagerInstance, receivedStr } from "#test/test-utils/test-utils";
import { toTitleCase } from "#utils/strings"; import { toTitleCase } from "#utils/strings";
@ -56,7 +55,7 @@ export function toHavePositionalTag<P extends PositionalTagType>(
const tagType = typeof expectedTag === "string" ? expectedTag : expectedTag.tagType; const tagType = typeof expectedTag === "string" ? expectedTag : expectedTag.tagType;
const matchingTags = allTags.filter(t => t.tagType === tagType); const matchingTags = allTags.filter(t => t.tagType === tagType);
// If checking exclusively tag type, check solely the number of matching tags on field // If checking exclusively tag type, check solely the number of ,atching tags on field
if (typeof expectedTag === "string") { if (typeof expectedTag === "string") {
const pass = matchingTags.length === count; const pass = matchingTags.length === count;
const expectedStr = getPosTagStr(expectedTag); const expectedStr = getPosTagStr(expectedTag);
@ -73,6 +72,7 @@ export function toHavePositionalTag<P extends PositionalTagType>(
} }
// Check for equality with the provided object // Check for equality with the provided object
if (matchingTags.length === 0) { if (matchingTags.length === 0) {
return { return {
pass: false, pass: false,

View File

@ -47,7 +47,7 @@ export function toHaveTypes(
if (expectedTypes.length === 0) { if (expectedTypes.length === 0) {
return { return {
pass: this.isNot, pass: this.isNot,
message: () => "Expected to receive a non-empty array of PokemonTypes!", message: () => "Expected to recieve a non-empty array of PokemonTypes, but got one!",
}; };
} }