From ee03055f3b4642ab4fb90e4b9a63bcca5763722f Mon Sep 17 00:00:00 2001 From: delangle Date: Fri, 28 Apr 2023 11:06:19 +0200 Subject: [PATCH] [core] Remove toEqualDateTime chai matcher --- test/utils/initMatchers.ts | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/test/utils/initMatchers.ts b/test/utils/initMatchers.ts index 42df3dd75d9950..4c4b0a3cacf080 100644 --- a/test/utils/initMatchers.ts +++ b/test/utils/initMatchers.ts @@ -75,10 +75,6 @@ declare global { * @see [Excluding Elements from the Accessibility Tree](https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion) */ toBeInaccessible(): void; - /** - * Matcher with useful error messages if the dates don't match. - */ - toEqualDateTime(expected: Date): void; toHaveAccessibleDescription(description: string): void; /** * Checks if the accessible name computation (according to `accname` spec) @@ -475,15 +471,6 @@ chai.use((chaiAPI, utils) => { }, ); - chai.Assertion.addMethod('toEqualDateTime', function toEqualDateTime(expectedDate, message) { - // eslint-disable-next-line no-underscore-dangle - const actualDate = this._obj; - const assertion = new chai.Assertion(actualDate.toISOString(), message); - // TODO: Investigate if `as any` can be removed after https://github.com/DefinitelyTyped/DefinitelyTyped/issues/48634 is resolved. - utils.transferFlags(this as any, assertion, false); - assertion.to.equal(expectedDate.toISOString()); - }); - chai.Assertion.addMethod('toThrowMinified', function toThrowMinified(expectedDevMessage) { // TODO: Investigate if `as any` can be removed after https://github.com/DefinitelyTyped/DefinitelyTyped/issues/48634 is resolved. if (process.env.NODE_ENV !== 'production') {