Updating NPM dependencies
This commit is contained in:
62
node_modules/@jest/environment/build/index.d.ts
generated
vendored
62
node_modules/@jest/environment/build/index.d.ts
generated
vendored
@@ -5,12 +5,10 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
/// <reference types="node" />
|
||||
/// <reference types="jest" />
|
||||
import { Script } from 'vm';
|
||||
import { Circus, Config, Global } from '@jest/types';
|
||||
import jestMock, { ModuleMocker } from 'jest-mock';
|
||||
import { ScriptTransformer } from '@jest/transform';
|
||||
import { JestFakeTimers as FakeTimers } from '@jest/fake-timers';
|
||||
import type { Context, Script } from 'vm';
|
||||
import type { LegacyFakeTimers, ModernFakeTimers } from '@jest/fake-timers';
|
||||
import type { Circus, Config, Global } from '@jest/types';
|
||||
import jestMock = require('jest-mock');
|
||||
declare type JestMockFn = typeof jestMock.fn;
|
||||
declare type JestMockSpyOn = typeof jestMock.spyOn;
|
||||
export declare type EnvironmentContext = Partial<{
|
||||
@@ -18,31 +16,30 @@ export declare type EnvironmentContext = Partial<{
|
||||
docblockPragmas: Record<string, string | Array<string>>;
|
||||
testPath: Config.Path;
|
||||
}>;
|
||||
export declare type ModuleWrapper = (module: Module, exports: Module['exports'], require: Module['require'], __dirname: string, __filename: Module['filename'], global: Global.Global, jest: Jest, ...extraGlobals: Array<Global.Global[keyof Global.Global]>) => unknown;
|
||||
export declare type ModuleWrapper = (this: Module['exports'], module: Module, exports: Module['exports'], require: Module['require'], __dirname: string, __filename: Module['filename'], global: Global.Global, jest?: Jest, ...extraGlobals: Array<Global.Global[keyof Global.Global]>) => unknown;
|
||||
export declare class JestEnvironment {
|
||||
constructor(config: Config.ProjectConfig, context?: EnvironmentContext);
|
||||
global: Global.Global;
|
||||
fakeTimers: FakeTimers<unknown> | null;
|
||||
moduleMocker: ModuleMocker | null;
|
||||
runScript(script: Script): {
|
||||
[ScriptTransformer.EVAL_RESULT_VARIABLE]: ModuleWrapper;
|
||||
} | null;
|
||||
fakeTimers: LegacyFakeTimers<unknown> | null;
|
||||
fakeTimersModern: ModernFakeTimers | null;
|
||||
moduleMocker: jestMock.ModuleMocker | null;
|
||||
/**
|
||||
* @deprecated implement getVmContext instead
|
||||
*/
|
||||
runScript<T = unknown>(script: Script): T | null;
|
||||
getVmContext?(): Context | null;
|
||||
setup(): Promise<void>;
|
||||
teardown(): Promise<void>;
|
||||
handleTestEvent?(event: Circus.Event, state: Circus.State): void;
|
||||
handleTestEvent?(event: Circus.Event, state: Circus.State): void | Promise<void>;
|
||||
}
|
||||
export declare type Module = NodeModule;
|
||||
export interface LocalModuleRequire extends NodeRequire {
|
||||
requireActual(moduleName: string): unknown;
|
||||
requireMock(moduleName: string): unknown;
|
||||
}
|
||||
export interface Jest {
|
||||
/**
|
||||
* Provides a way to add Jasmine-compatible matchers into your Jest context.
|
||||
*
|
||||
* @deprecated Use `expect.extend` instead
|
||||
*/
|
||||
addMatchers(matchers: Record<string, any>): void;
|
||||
addMatchers(matchers: Record<string, unknown>): void;
|
||||
/**
|
||||
* Advances all timers by the needed milliseconds so that only the next timeouts/intervals will run.
|
||||
* Optionally, you can provide steps, so it will run steps amount of next timeouts/intervals.
|
||||
@@ -106,12 +103,22 @@ export interface Jest {
|
||||
*
|
||||
* This is useful when you want to create a manual mock that extends the
|
||||
* automatic mock's behavior.
|
||||
*
|
||||
* @deprecated Use `jest.createMockFromModule()` instead
|
||||
*/
|
||||
genMockFromModule(moduleName: string): unknown;
|
||||
/**
|
||||
* Given the name of a module, use the automatic mocking system to generate a
|
||||
* mocked version of the module for you.
|
||||
*
|
||||
* This is useful when you want to create a manual mock that extends the
|
||||
* automatic mock's behavior.
|
||||
*/
|
||||
createMockFromModule(moduleName: string): unknown;
|
||||
/**
|
||||
* Determines if the given function is a mocked function.
|
||||
*/
|
||||
isMockFunction(fn: Function): fn is ReturnType<JestMockFn>;
|
||||
isMockFunction(fn: (...args: Array<any>) => unknown): fn is ReturnType<JestMockFn>;
|
||||
/**
|
||||
* Mocks a module with an auto-mocked version when it is being required.
|
||||
*/
|
||||
@@ -177,6 +184,8 @@ export interface Jest {
|
||||
retryTimes(numRetries: number): Jest;
|
||||
/**
|
||||
* Exhausts tasks queued by setImmediate().
|
||||
*
|
||||
* > Note: This function is not available when using Lolex as fake timers implementation
|
||||
*/
|
||||
runAllImmediates(): void;
|
||||
/**
|
||||
@@ -247,7 +256,7 @@ export interface Jest {
|
||||
/**
|
||||
* Instructs Jest to use fake versions of the standard timer functions.
|
||||
*/
|
||||
useFakeTimers(): Jest;
|
||||
useFakeTimers(implementation?: 'modern' | 'legacy'): Jest;
|
||||
/**
|
||||
* Instructs Jest to use the real versions of the standard timer functions.
|
||||
*/
|
||||
@@ -259,6 +268,17 @@ export interface Jest {
|
||||
* every test so that local module state doesn't conflict between tests.
|
||||
*/
|
||||
isolateModules(fn: () => void): Jest;
|
||||
/**
|
||||
* When mocking time, `Date.now()` will also be mocked. If you for some reason need access to the real current time, you can invoke this function.
|
||||
*
|
||||
* > Note: This function is only available when using Lolex as fake timers implementation
|
||||
*/
|
||||
getRealSystemTime(): number;
|
||||
/**
|
||||
* Set the current system time used by fake timers. Simulates a user changing the system clock while your program is running. It affects the current time but it does not in itself cause e.g. timers to fire; they will fire exactly as they would have done without the call to `jest.setSystemTime()`.
|
||||
*
|
||||
* > Note: This function is only available when using Lolex as fake timers implementation
|
||||
*/
|
||||
setSystemTime(now?: number | Date): void;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/@jest/environment/build/index.d.ts.map
generated
vendored
1
node_modules/@jest/environment/build/index.d.ts.map
generated
vendored
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAC,MAAM,aAAa,CAAC;AACnD,OAAO,QAAQ,EA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aAAa,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC;;OAEG;IACH,aAAa,IAAI,IAAI,CAAC;IACtB;;OAEG;IACH,aAAa,IAAI,IAAI,CAAC;IACtB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CACtC"}
|
||||
20
node_modules/@jest/environment/build/index.js
generated
vendored
20
node_modules/@jest/environment/build/index.js
generated
vendored
@@ -1,25 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
function _transform() {
|
||||
const data = require('@jest/transform');
|
||||
function _jestMock() {
|
||||
const data = _interopRequireDefault(require('jest-mock'));
|
||||
|
||||
_transform = function _transform() {
|
||||
_jestMock = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
return obj;
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user