mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 15:03:24 +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
|
* @param expected - The expected contents of the array, in any order
|
||||||
* @see {@linkcode expect.arrayContaining}
|
* @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.
|
* 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 { 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 { toHaveAbilityApplied } from "#test/test-utils/matchers/to-have-ability-applied";
|
||||||
import { toHaveArenaTag } from "#test/test-utils/matchers/to-have-arena-tag";
|
import { toHaveArenaTag } from "#test/test-utils/matchers/to-have-arena-tag";
|
||||||
import { toHaveBattlerTag } from "#test/test-utils/matchers/to-have-battler-tag";
|
import { toHaveBattlerTag } from "#test/test-utils/matchers/to-have-battler-tag";
|
||||||
@ -27,7 +27,7 @@ import { expect } from "vitest";
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
expect.extend({
|
expect.extend({
|
||||||
toEqualArrayUnsorted,
|
toEqualUnsorted,
|
||||||
toHaveKey,
|
toHaveKey,
|
||||||
toHaveShownMessage,
|
toHaveShownMessage,
|
||||||
toBeAtPhase,
|
toBeAtPhase,
|
||||||
|
@ -8,11 +8,7 @@ import type { MatcherState, SyncExpectationResult } from "@vitest/expect";
|
|||||||
* @param expected - The array to check equality with
|
* @param expected - The array to check equality with
|
||||||
* @returns Whether the matcher passed
|
* @returns Whether the matcher passed
|
||||||
*/
|
*/
|
||||||
export function toEqualArrayUnsorted(
|
export function toEqualUnsorted(this: MatcherState, received: unknown, expected: unknown[]): SyncExpectationResult {
|
||||||
this: MatcherState,
|
|
||||||
received: unknown,
|
|
||||||
expected: unknown[],
|
|
||||||
): SyncExpectationResult {
|
|
||||||
if (!Array.isArray(received)) {
|
if (!Array.isArray(received)) {
|
||||||
return {
|
return {
|
||||||
pass: this.isNot,
|
pass: this.isNot,
|
Loading…
Reference in New Issue
Block a user