mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 06:53:27 +02:00
Renamed toEqualArrayUnsorted
into toEqualUnsorted
This commit is contained in:
parent
f1a0f96b37
commit
f52faab436
2
test/@types/vitest.d.ts
vendored
2
test/@types/vitest.d.ts
vendored
@ -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.
|
||||
|
@ -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,
|
||||
|
@ -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,
|
Loading…
Reference in New Issue
Block a user