@jest/globals
Advanced tools
Comparing version 29.0.0-alpha.5 to 29.0.0-alpha.6
@@ -10,3 +10,3 @@ /** | ||
import type { Global } from '@jest/types'; | ||
export declare const jest: Jest; | ||
import type { ClassLike, FunctionLike, Mocked as JestMocked, MockedClass as JestMockedClass, MockedFunction as JestMockedFunction, MockedObject as JestMockedObject } from 'jest-mock'; | ||
export declare const expect: JestExpect; | ||
@@ -25,1 +25,21 @@ export declare const it: Global.GlobalAdditions['it']; | ||
export declare const afterAll: Global.GlobalAdditions['afterAll']; | ||
declare const jest: Jest; | ||
declare namespace jest { | ||
/** | ||
* Wraps a class, function or object type with Jest mock type definitions. | ||
*/ | ||
type Mocked<T extends object> = JestMocked<T>; | ||
/** | ||
* Wraps a class type with Jest mock type definitions. | ||
*/ | ||
type MockedClass<T extends ClassLike> = JestMockedClass<T>; | ||
/** | ||
* Wraps a function type with Jest mock type definitions. | ||
*/ | ||
type MockedFunction<T extends FunctionLike> = JestMockedFunction<T>; | ||
/** | ||
* Wraps an object type with Jest mock type definitions. | ||
*/ | ||
type MockedObject<T extends object> = JestMockedObject<T>; | ||
} | ||
export { jest }; |
@@ -9,4 +9,5 @@ 'use strict'; | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-namespace | ||
throw new Error( | ||
'Do not import `@jest/globals` outside of the Jest test environment' | ||
); |
{ | ||
"name": "@jest/globals", | ||
"version": "29.0.0-alpha.5", | ||
"version": "29.0.0-alpha.6", | ||
"repository": { | ||
@@ -23,5 +23,6 @@ "type": "git", | ||
"dependencies": { | ||
"@jest/environment": "^29.0.0-alpha.4", | ||
"@jest/expect": "^29.0.0-alpha.5", | ||
"@jest/types": "^29.0.0-alpha.4" | ||
"@jest/environment": "^29.0.0-alpha.6", | ||
"@jest/expect": "^29.0.0-alpha.6", | ||
"@jest/types": "^29.0.0-alpha.6", | ||
"jest-mock": "^29.0.0-alpha.6" | ||
}, | ||
@@ -31,3 +32,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "63e506b5d1558a9132a8fa65151407b0a40be3a5" | ||
"gitHead": "4def94b073cad300e99de378ba900e6ba9b7032f" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4233
54
4