mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 20:09:04 +00:00
Add type parameter to expect (#6128)
This commit is contained in:
6
packages/bun-types/bun-test.d.ts
vendored
6
packages/bun-types/bun-test.d.ts
vendored
@@ -479,13 +479,13 @@ declare module "bun:test" {
|
||||
* @param actual the actual value
|
||||
*/
|
||||
export const expect: {
|
||||
(actual?: unknown): Expect;
|
||||
<T = unknown>(actual?: T): Expect<T>;
|
||||
any: (
|
||||
constructor: ((..._: any[]) => any) | { new (..._: any[]): any },
|
||||
) => Expect;
|
||||
anything: () => Expect;
|
||||
stringContaining: (str: string) => Expect;
|
||||
stringMatching: (regex: RegExp | string) => Expect;
|
||||
stringContaining: (str: string) => Expect<string>;
|
||||
stringMatching: <T extends RegExp | string>(regex: T) => Expect<T>;
|
||||
};
|
||||
/**
|
||||
* Asserts that a value matches some criteria.
|
||||
|
||||
Reference in New Issue
Block a user