Renamed toEqualArrayUnsorted into toEqualUnsorted

This commit is contained in:
Bertie690 2025-09-15 20:49:13 -04:00 committed by Sirz Benjie
parent f1a0f96b37
commit f52faab436
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E
3 changed files with 4 additions and 8 deletions

View File

@ -63,7 +63,7 @@ interface GenericMatchers<T> {
* @param expected - The expected contents of the array, in any order
* @see {@linkcode expect.arrayContaining}
*/
toEqualArrayUnsorted: T extends (infer U)[] ? (expected: U[]) => void : never;
toEqualUnsorted: T extends (infer U)[] ? (expected: U[]) => void : never;
/**
* Check whether a {@linkcode Map} contains the given key, disregarding its value.

View File

@ -1,5 +1,5 @@
import { toBeAtPhase } from "#test/test-utils/matchers/to-be-at-phase";
import { toEqualArrayUnsorted } from "#test/test-utils/matchers/to-equal-array-unsorted";
import { toEqualUnsorted } from "#test/test-utils/matchers/to-equal-unsorted";
import { toHaveAbilityApplied } from "#test/test-utils/matchers/to-have-ability-applied";
import { toHaveArenaTag } from "#test/test-utils/matchers/to-have-arena-tag";
import { toHaveBattlerTag } from "#test/test-utils/matchers/to-have-battler-tag";
@ -27,7 +27,7 @@ import { expect } from "vitest";
*/
expect.extend({
toEqualArrayUnsorted,
toEqualUnsorted,
toHaveKey,
toHaveShownMessage,
toBeAtPhase,

View File

@ -8,11 +8,7 @@ import type { MatcherState, SyncExpectationResult } from "@vitest/expect";
* @param expected - The array to check equality with
* @returns Whether the matcher passed
*/
export function toEqualArrayUnsorted(
this: MatcherState,
received: unknown,
expected: unknown[],
): SyncExpectationResult {
export function toEqualUnsorted(this: MatcherState, received: unknown, expected: unknown[]): SyncExpectationResult {
if (!Array.isArray(received)) {
return {
pass: this.isNot,