0d2c5520ed
This refactors the changes from my previous PR to allow smooth scrolling for the appDir case -- `componentDidUpdate` isn't a reliable way to check if only the hash has changed. This adds a property to `focusAndScrollRef` and compares canonicalUrls (sans hash fragment) - Original https://github.com/vercel/next.js/pull/52915 Co-authored-by: Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
23 lines
832 B
TypeScript
23 lines
832 B
TypeScript
/// <reference types="jest" />
|
|
/// <reference types="jest-extended" />
|
|
|
|
declare namespace jest {
|
|
// https://github.com/jestjs/jest/blob/6460335f88cee3dcb9d29c49d55ab02b9d83f994/packages/expect/src/types.ts#L58-L72
|
|
interface MatcherState {
|
|
assertionCalls: number
|
|
error?: Error
|
|
expectedAssertionsNumber: number | null
|
|
expectedAssertionsNumberError?: Error
|
|
isExpectingAssertionsError?: Error
|
|
isNot?: boolean
|
|
numPassingAsserts: number
|
|
promise?: string
|
|
suppressedErrors: Array<Error>
|
|
}
|
|
|
|
interface Expect {
|
|
// https://github.com/jestjs/jest/blob/6460335f88cee3dcb9d29c49d55ab02b9d83f994/packages/expect/src/index.ts#L461
|
|
// https://github.com/jestjs/jest/blob/6460335f88cee3dcb9d29c49d55ab02b9d83f994/packages/expect/src/jestMatchersObject.ts#L44-L45
|
|
getState(): MatcherState
|
|
}
|
|
}
|