vitest-auto-spy 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/angular.js +4 -4
- package/dist/bun-angular.js +5 -5
- package/dist/bun.js +4 -4
- package/dist/{chunk-JX5ROCS7.js → chunk-4DOGBEZY.js} +2 -2
- package/dist/{chunk-BUWKNMO3.js → chunk-M7ZUY64E.js} +1 -1
- package/dist/{chunk-NCIGTWVZ.js → chunk-MEPJCQZ3.js} +2 -2
- package/dist/{chunk-ZJA7DTXR.js → chunk-SU7S3H4L.js} +26 -28
- package/dist/{chunk-6RGTS3E6.js → chunk-ZX2JXM5H.js} +1 -1
- package/dist/console.js +1 -1
- package/dist/index.js +4 -4
- package/dist/nestjs.js +2 -2
- package/dist/node.cjs +26 -28
- package/dist/node.js +4 -4
- package/dist/react.js +4 -4
- package/dist/svelte.js +4 -4
- package/dist/vue.js +5 -5
- package/package.json +17 -7
package/dist/angular.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useVitestAdapter } from './chunk-XPUCQU4O.js';
|
|
2
|
-
export { createWithAutoSpies, flushEffects, injectSpy, provideAutoSpy, renderShallow, runEffect, stable } from './chunk-
|
|
2
|
+
export { createWithAutoSpies, flushEffects, injectSpy, provideAutoSpy, renderShallow, runEffect, stable } from './chunk-4DOGBEZY.js';
|
|
3
3
|
import './chunk-OS2QFTIF.js';
|
|
4
|
-
export { expectEmission, expectEmissions, expectNoEmission } from './chunk-
|
|
4
|
+
export { expectEmission, expectEmissions, expectNoEmission } from './chunk-ZX2JXM5H.js';
|
|
5
5
|
import { mockReadonlyProp } from './chunk-DNKYISGG.js';
|
|
6
6
|
export { mockAccessorsProp, mockReadonlyProp, mockReadonlyPropGetter, mockValueProp, restoreMockedProps } from './chunk-DNKYISGG.js';
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
7
|
+
import './chunk-M7ZUY64E.js';
|
|
8
|
+
import './chunk-SU7S3H4L.js';
|
|
9
9
|
import './chunk-ZJ7NH6LG.js';
|
|
10
10
|
import './chunk-RZVTIR4R.js';
|
|
11
11
|
import './chunk-KKXZ4JFP.js';
|
package/dist/bun-angular.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { createWithAutoSpies, flushEffects, injectSpy, provideAutoSpy, renderShallow, runEffect, stable } from './chunk-
|
|
1
|
+
export { createWithAutoSpies, flushEffects, injectSpy, provideAutoSpy, renderShallow, runEffect, stable } from './chunk-4DOGBEZY.js';
|
|
2
2
|
import './chunk-WBQNVPQL.js';
|
|
3
3
|
import './chunk-NQXXUJPS.js';
|
|
4
|
-
export { asInstance, asSpy, clearAutoSpy, createMock, createSpyClass, intersectionEntry, mockDeep, resetAutoSpy, stubIntersectionObserver, stubMutationObserver, stubObserver, stubResizeObserver } from './chunk-
|
|
5
|
-
export { createAutoMock, expectEmission, expectEmissions, expectNoEmission } from './chunk-
|
|
4
|
+
export { asInstance, asSpy, clearAutoSpy, createMock, createSpyClass, intersectionEntry, mockDeep, resetAutoSpy, stubIntersectionObserver, stubMutationObserver, stubObserver, stubResizeObserver } from './chunk-MEPJCQZ3.js';
|
|
5
|
+
export { createAutoMock, expectEmission, expectEmissions, expectNoEmission } from './chunk-ZX2JXM5H.js';
|
|
6
6
|
export { countMockedProps, mockAccessorsProp, mockReadonlyProp, mockReadonlyPropGetter, mockValueProp, restoreMockedProps } from './chunk-DNKYISGG.js';
|
|
7
|
-
export { createSpyFromClass } from './chunk-
|
|
8
|
-
export { createFunctionSpy, errorHandler } from './chunk-
|
|
7
|
+
export { createSpyFromClass } from './chunk-M7ZUY64E.js';
|
|
8
|
+
export { createFunctionSpy, errorHandler } from './chunk-SU7S3H4L.js';
|
|
9
9
|
import './chunk-ZJ7NH6LG.js';
|
|
10
10
|
export { describeDuplicateCopies, getPackageCopies } from './chunk-RZVTIR4R.js';
|
|
11
11
|
import { withDocs, DOCS_LINKS } from './chunk-KKXZ4JFP.js';
|
package/dist/bun.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import './chunk-WBQNVPQL.js';
|
|
2
2
|
import './chunk-NQXXUJPS.js';
|
|
3
|
-
export { asInstance, asSpy, clearAutoSpy, createMock, createSpyClass, intersectionEntry, mockDeep, resetAutoSpy, stubIntersectionObserver, stubMutationObserver, stubObserver, stubResizeObserver } from './chunk-
|
|
4
|
-
export { createAutoMock, expectEmission, expectEmissions, expectNoEmission } from './chunk-
|
|
3
|
+
export { asInstance, asSpy, clearAutoSpy, createMock, createSpyClass, intersectionEntry, mockDeep, resetAutoSpy, stubIntersectionObserver, stubMutationObserver, stubObserver, stubResizeObserver } from './chunk-MEPJCQZ3.js';
|
|
4
|
+
export { createAutoMock, expectEmission, expectEmissions, expectNoEmission } from './chunk-ZX2JXM5H.js';
|
|
5
5
|
export { countMockedProps, mockAccessorsProp, mockReadonlyProp, mockReadonlyPropGetter, mockValueProp, restoreMockedProps } from './chunk-DNKYISGG.js';
|
|
6
|
-
export { createSpyFromClass } from './chunk-
|
|
7
|
-
export { createFunctionSpy, errorHandler } from './chunk-
|
|
6
|
+
export { createSpyFromClass } from './chunk-M7ZUY64E.js';
|
|
7
|
+
export { createFunctionSpy, errorHandler } from './chunk-SU7S3H4L.js';
|
|
8
8
|
import './chunk-ZJ7NH6LG.js';
|
|
9
9
|
export { describeDuplicateCopies, getPackageCopies } from './chunk-RZVTIR4R.js';
|
|
10
10
|
import './chunk-KKXZ4JFP.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createAutoMock } from './chunk-
|
|
2
|
-
import { createSpyFromClass } from './chunk-
|
|
1
|
+
import { createAutoMock } from './chunk-ZX2JXM5H.js';
|
|
2
|
+
import { createSpyFromClass } from './chunk-M7ZUY64E.js';
|
|
3
3
|
import { withDocs, DOCS_LINKS } from './chunk-KKXZ4JFP.js';
|
|
4
4
|
import { TestBed } from '@angular/core/testing';
|
|
5
5
|
import { NO_ERRORS_SCHEMA, Injector, runInInjectionContext, ApplicationRef, ɵSIGNAL as _SIGNAL } from '@angular/core';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createFunctionSpy, markAsMock } from './chunk-
|
|
1
|
+
import { createFunctionSpy, markAsMock } from './chunk-SU7S3H4L.js';
|
|
2
2
|
import { requireObservableSupport } from './chunk-ZJ7NH6LG.js';
|
|
3
3
|
import { getMockAdapter } from './chunk-RZVTIR4R.js';
|
|
4
4
|
import { withDocs, DOCS_LINKS } from './chunk-KKXZ4JFP.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mockValueProp } from './chunk-DNKYISGG.js';
|
|
2
|
-
import { createSpyFromClass } from './chunk-
|
|
3
|
-
import { runClearHook, runConfigReset, createFunctionSpy, isMarkedMock } from './chunk-
|
|
2
|
+
import { createSpyFromClass } from './chunk-M7ZUY64E.js';
|
|
3
|
+
import { runClearHook, runConfigReset, createFunctionSpy, isMarkedMock } from './chunk-SU7S3H4L.js';
|
|
4
4
|
import { getMockAdapter } from './chunk-RZVTIR4R.js';
|
|
5
5
|
|
|
6
6
|
// src/lib/create-mock.ts
|
|
@@ -264,31 +264,28 @@ function unwrapContainer(container) {
|
|
|
264
264
|
}
|
|
265
265
|
return container.value;
|
|
266
266
|
}
|
|
267
|
+
var NO_MATCH = /* @__PURE__ */ Symbol("vitest-auto-spy.noMatch");
|
|
267
268
|
function lookupConfigured(calledWithObject, actualArgs) {
|
|
268
269
|
const configured = calledWithObject.argsToValuesMap.get(actualArgs);
|
|
269
|
-
|
|
270
|
-
return { found: true, value: unwrapContainer(configured) };
|
|
271
|
-
}
|
|
272
|
-
return { found: false, value: void 0 };
|
|
270
|
+
return isReturnValueContainer(configured) ? unwrapContainer(configured) : NO_MATCH;
|
|
273
271
|
}
|
|
274
|
-
function returnTheCorrectFakeValue(
|
|
275
|
-
if (
|
|
276
|
-
const match = lookupConfigured(
|
|
277
|
-
if (match
|
|
278
|
-
return match
|
|
272
|
+
function returnTheCorrectFakeValue(state, actualArgs, functionName) {
|
|
273
|
+
if (state.calledWith) {
|
|
274
|
+
const match = lookupConfigured(state.calledWith, actualArgs);
|
|
275
|
+
if (match !== NO_MATCH) {
|
|
276
|
+
return match;
|
|
279
277
|
}
|
|
280
278
|
}
|
|
281
|
-
if (
|
|
282
|
-
const match = lookupConfigured(
|
|
283
|
-
if (match
|
|
284
|
-
return match
|
|
279
|
+
if (state.mustBeCalledWith) {
|
|
280
|
+
const match = lookupConfigured(state.mustBeCalledWith, actualArgs);
|
|
281
|
+
if (match !== NO_MATCH) {
|
|
282
|
+
return match;
|
|
285
283
|
}
|
|
286
284
|
errorHandler.throwArgumentsError(actualArgs, functionName);
|
|
287
285
|
}
|
|
288
|
-
return unwrapContainer(valueContainer);
|
|
286
|
+
return unwrapContainer(state.valueContainer);
|
|
289
287
|
}
|
|
290
288
|
function addMethodsToCalledWith(calledWith, calledWithArgs) {
|
|
291
|
-
calledWith.wasConfigured = true;
|
|
292
289
|
const setReturnValue = (value) => {
|
|
293
290
|
calledWith.argsToValuesMap.set(calledWithArgs, { value });
|
|
294
291
|
};
|
|
@@ -301,29 +298,30 @@ function addMethodsToCalledWith(calledWith, calledWithArgs) {
|
|
|
301
298
|
getObservableSupport()?.addToCalledWithObject(calledWith, calledWithArgs);
|
|
302
299
|
return calledWith;
|
|
303
300
|
}
|
|
304
|
-
function
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
301
|
+
function ensureCalledWithObject(state, chain) {
|
|
302
|
+
const existing = state[chain];
|
|
303
|
+
if (existing) {
|
|
304
|
+
return existing;
|
|
305
|
+
}
|
|
306
|
+
const created = { argsToValuesMap: new ArgsMap() };
|
|
307
|
+
state[chain] = created;
|
|
308
|
+
return created;
|
|
310
309
|
}
|
|
311
310
|
function createFunctionSpy(name) {
|
|
312
|
-
const calledWithObject = createCalledWithObject();
|
|
313
|
-
const mustBeCalledWithObject = createCalledWithObject();
|
|
314
311
|
const valueContainer = { value: void 0 };
|
|
315
|
-
const
|
|
312
|
+
const state = { valueContainer };
|
|
313
|
+
const dispatch = (...actualArgs) => settledResultsRecorder.record(returnTheCorrectFakeValue(state, actualArgs, name));
|
|
316
314
|
const functionSpy = getMockAdapter().createMockFn(dispatch, name);
|
|
317
315
|
const settledResultsRecorder = installSettledResultsPolyfill(functionSpy);
|
|
318
316
|
addPromiseHelpersToFunctionSpy(functionSpy, valueContainer);
|
|
319
317
|
getObservableSupport()?.addToFunctionSpy(functionSpy, valueContainer);
|
|
320
318
|
const spy = decorate(functionSpy, {
|
|
321
|
-
calledWith: (...calledWithArgs) => addMethodsToCalledWith(
|
|
322
|
-
mustBeCalledWith: (...calledWithArgs) => addMethodsToCalledWith(
|
|
319
|
+
calledWith: (...calledWithArgs) => addMethodsToCalledWith(ensureCalledWithObject(state, "calledWith"), calledWithArgs),
|
|
320
|
+
mustBeCalledWith: (...calledWithArgs) => addMethodsToCalledWith(ensureCalledWithObject(state, "mustBeCalledWith"), calledWithArgs)
|
|
323
321
|
});
|
|
324
322
|
attachConfigReset(spy, () => {
|
|
325
|
-
|
|
326
|
-
|
|
323
|
+
delete state.calledWith;
|
|
324
|
+
delete state.mustBeCalledWith;
|
|
327
325
|
valueContainer.value = void 0;
|
|
328
326
|
delete valueContainer._isRejectedPromise;
|
|
329
327
|
delete valueContainer.valuesPerCalls;
|
package/dist/console.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { vitestMockAdapter } from './chunk-OS2QFTIF.js';
|
|
2
|
-
import { createFunctionSpy } from './chunk-
|
|
2
|
+
import { createFunctionSpy } from './chunk-SU7S3H4L.js';
|
|
3
3
|
import './chunk-ZJ7NH6LG.js';
|
|
4
4
|
import { hasMockAdapter, registerMockAdapter, getMockAdapter } from './chunk-RZVTIR4R.js';
|
|
5
5
|
import './chunk-KKXZ4JFP.js';
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { vitestMockAdapter } from './chunk-OS2QFTIF.js';
|
|
2
|
-
export { asInstance, asSpy, clearAutoSpy, createMock, createSpyClass, intersectionEntry, mockDeep, resetAutoSpy, stubIntersectionObserver, stubMutationObserver, stubObserver, stubResizeObserver } from './chunk-
|
|
3
|
-
export { createAutoMock, expectEmission, expectEmissions, expectNoEmission } from './chunk-
|
|
2
|
+
export { asInstance, asSpy, clearAutoSpy, createMock, createSpyClass, intersectionEntry, mockDeep, resetAutoSpy, stubIntersectionObserver, stubMutationObserver, stubObserver, stubResizeObserver } from './chunk-MEPJCQZ3.js';
|
|
3
|
+
export { createAutoMock, expectEmission, expectEmissions, expectNoEmission } from './chunk-ZX2JXM5H.js';
|
|
4
4
|
export { countMockedProps, mockAccessorsProp, mockReadonlyProp, mockReadonlyPropGetter, mockValueProp, restoreMockedProps } from './chunk-DNKYISGG.js';
|
|
5
|
-
export { createSpyFromClass } from './chunk-
|
|
6
|
-
export { createFunctionSpy, errorHandler } from './chunk-
|
|
5
|
+
export { createSpyFromClass } from './chunk-M7ZUY64E.js';
|
|
6
|
+
export { createFunctionSpy, errorHandler } from './chunk-SU7S3H4L.js';
|
|
7
7
|
import './chunk-ZJ7NH6LG.js';
|
|
8
8
|
import { registerMockAdapter } from './chunk-RZVTIR4R.js';
|
|
9
9
|
export { describeDuplicateCopies, getPackageCopies } from './chunk-RZVTIR4R.js';
|
package/dist/nestjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { vitestMockAdapter } from './chunk-OS2QFTIF.js';
|
|
2
|
-
import { createSpyFromClass } from './chunk-
|
|
3
|
-
import './chunk-
|
|
2
|
+
import { createSpyFromClass } from './chunk-M7ZUY64E.js';
|
|
3
|
+
import './chunk-SU7S3H4L.js';
|
|
4
4
|
import './chunk-ZJ7NH6LG.js';
|
|
5
5
|
import { registerMockAdapter } from './chunk-RZVTIR4R.js';
|
|
6
6
|
import './chunk-KKXZ4JFP.js';
|
package/dist/node.cjs
CHANGED
|
@@ -462,31 +462,28 @@ function unwrapContainer(container) {
|
|
|
462
462
|
}
|
|
463
463
|
return container.value;
|
|
464
464
|
}
|
|
465
|
+
var NO_MATCH = /* @__PURE__ */ Symbol("vitest-auto-spy.noMatch");
|
|
465
466
|
function lookupConfigured(calledWithObject, actualArgs) {
|
|
466
467
|
const configured = calledWithObject.argsToValuesMap.get(actualArgs);
|
|
467
|
-
|
|
468
|
-
return { found: true, value: unwrapContainer(configured) };
|
|
469
|
-
}
|
|
470
|
-
return { found: false, value: void 0 };
|
|
468
|
+
return isReturnValueContainer(configured) ? unwrapContainer(configured) : NO_MATCH;
|
|
471
469
|
}
|
|
472
|
-
function returnTheCorrectFakeValue(
|
|
473
|
-
if (
|
|
474
|
-
const match = lookupConfigured(
|
|
475
|
-
if (match
|
|
476
|
-
return match
|
|
470
|
+
function returnTheCorrectFakeValue(state, actualArgs, functionName) {
|
|
471
|
+
if (state.calledWith) {
|
|
472
|
+
const match = lookupConfigured(state.calledWith, actualArgs);
|
|
473
|
+
if (match !== NO_MATCH) {
|
|
474
|
+
return match;
|
|
477
475
|
}
|
|
478
476
|
}
|
|
479
|
-
if (
|
|
480
|
-
const match = lookupConfigured(
|
|
481
|
-
if (match
|
|
482
|
-
return match
|
|
477
|
+
if (state.mustBeCalledWith) {
|
|
478
|
+
const match = lookupConfigured(state.mustBeCalledWith, actualArgs);
|
|
479
|
+
if (match !== NO_MATCH) {
|
|
480
|
+
return match;
|
|
483
481
|
}
|
|
484
482
|
errorHandler.throwArgumentsError(actualArgs, functionName);
|
|
485
483
|
}
|
|
486
|
-
return unwrapContainer(valueContainer);
|
|
484
|
+
return unwrapContainer(state.valueContainer);
|
|
487
485
|
}
|
|
488
486
|
function addMethodsToCalledWith(calledWith, calledWithArgs) {
|
|
489
|
-
calledWith.wasConfigured = true;
|
|
490
487
|
const setReturnValue = (value) => {
|
|
491
488
|
calledWith.argsToValuesMap.set(calledWithArgs, { value });
|
|
492
489
|
};
|
|
@@ -498,28 +495,29 @@ function addMethodsToCalledWith(calledWith, calledWithArgs) {
|
|
|
498
495
|
addPromiseHelpersToCalledWithObject(calledWith, calledWithArgs);
|
|
499
496
|
return calledWith;
|
|
500
497
|
}
|
|
501
|
-
function
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
498
|
+
function ensureCalledWithObject(state, chain) {
|
|
499
|
+
const existing = state[chain];
|
|
500
|
+
if (existing) {
|
|
501
|
+
return existing;
|
|
502
|
+
}
|
|
503
|
+
const created = { argsToValuesMap: new ArgsMap() };
|
|
504
|
+
state[chain] = created;
|
|
505
|
+
return created;
|
|
507
506
|
}
|
|
508
507
|
function createFunctionSpy(name) {
|
|
509
|
-
const calledWithObject = createCalledWithObject();
|
|
510
|
-
const mustBeCalledWithObject = createCalledWithObject();
|
|
511
508
|
const valueContainer = { value: void 0 };
|
|
512
|
-
const
|
|
509
|
+
const state = { valueContainer };
|
|
510
|
+
const dispatch = (...actualArgs) => settledResultsRecorder.record(returnTheCorrectFakeValue(state, actualArgs, name));
|
|
513
511
|
const functionSpy = getMockAdapter().createMockFn(dispatch, name);
|
|
514
512
|
const settledResultsRecorder = installSettledResultsPolyfill(functionSpy);
|
|
515
513
|
addPromiseHelpersToFunctionSpy(functionSpy, valueContainer);
|
|
516
514
|
const spy = decorate(functionSpy, {
|
|
517
|
-
calledWith: (...calledWithArgs) => addMethodsToCalledWith(
|
|
518
|
-
mustBeCalledWith: (...calledWithArgs) => addMethodsToCalledWith(
|
|
515
|
+
calledWith: (...calledWithArgs) => addMethodsToCalledWith(ensureCalledWithObject(state, "calledWith"), calledWithArgs),
|
|
516
|
+
mustBeCalledWith: (...calledWithArgs) => addMethodsToCalledWith(ensureCalledWithObject(state, "mustBeCalledWith"), calledWithArgs)
|
|
519
517
|
});
|
|
520
518
|
attachConfigReset(spy, () => {
|
|
521
|
-
|
|
522
|
-
|
|
519
|
+
delete state.calledWith;
|
|
520
|
+
delete state.mustBeCalledWith;
|
|
523
521
|
valueContainer.value = void 0;
|
|
524
522
|
delete valueContainer._isRejectedPromise;
|
|
525
523
|
delete valueContainer.valuesPerCalls;
|
package/dist/node.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createRedefineMockAdapter } from './chunk-NQXXUJPS.js';
|
|
2
|
-
export { asInstance, asSpy, clearAutoSpy, createMock, createSpyClass, intersectionEntry, mockDeep, resetAutoSpy, stubIntersectionObserver, stubMutationObserver, stubObserver, stubResizeObserver } from './chunk-
|
|
3
|
-
export { createAutoMock, expectEmission, expectEmissions, expectNoEmission } from './chunk-
|
|
2
|
+
export { asInstance, asSpy, clearAutoSpy, createMock, createSpyClass, intersectionEntry, mockDeep, resetAutoSpy, stubIntersectionObserver, stubMutationObserver, stubObserver, stubResizeObserver } from './chunk-MEPJCQZ3.js';
|
|
3
|
+
export { createAutoMock, expectEmission, expectEmissions, expectNoEmission } from './chunk-ZX2JXM5H.js';
|
|
4
4
|
export { countMockedProps, mockAccessorsProp, mockReadonlyProp, mockReadonlyPropGetter, mockValueProp, restoreMockedProps } from './chunk-DNKYISGG.js';
|
|
5
|
-
export { createSpyFromClass } from './chunk-
|
|
6
|
-
export { createFunctionSpy, errorHandler } from './chunk-
|
|
5
|
+
export { createSpyFromClass } from './chunk-M7ZUY64E.js';
|
|
6
|
+
export { createFunctionSpy, errorHandler } from './chunk-SU7S3H4L.js';
|
|
7
7
|
import './chunk-ZJ7NH6LG.js';
|
|
8
8
|
import { registerMockAdapter } from './chunk-RZVTIR4R.js';
|
|
9
9
|
export { describeDuplicateCopies, getPackageCopies } from './chunk-RZVTIR4R.js';
|
package/dist/react.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { vitestMockAdapter } from './chunk-OS2QFTIF.js';
|
|
2
|
-
export { asInstance, asSpy, clearAutoSpy, createMock, createSpyClass, intersectionEntry, mockDeep, resetAutoSpy, stubIntersectionObserver, stubMutationObserver, stubObserver, stubResizeObserver } from './chunk-
|
|
3
|
-
export { createAutoMock, expectEmission, expectEmissions, expectNoEmission } from './chunk-
|
|
2
|
+
export { asInstance, asSpy, clearAutoSpy, createMock, createSpyClass, intersectionEntry, mockDeep, resetAutoSpy, stubIntersectionObserver, stubMutationObserver, stubObserver, stubResizeObserver } from './chunk-MEPJCQZ3.js';
|
|
3
|
+
export { createAutoMock, expectEmission, expectEmissions, expectNoEmission } from './chunk-ZX2JXM5H.js';
|
|
4
4
|
export { countMockedProps, mockAccessorsProp, mockReadonlyProp, mockReadonlyPropGetter, mockValueProp, restoreMockedProps } from './chunk-DNKYISGG.js';
|
|
5
|
-
export { createSpyFromClass } from './chunk-
|
|
6
|
-
export { createFunctionSpy, errorHandler } from './chunk-
|
|
5
|
+
export { createSpyFromClass } from './chunk-M7ZUY64E.js';
|
|
6
|
+
export { createFunctionSpy, errorHandler } from './chunk-SU7S3H4L.js';
|
|
7
7
|
import './chunk-ZJ7NH6LG.js';
|
|
8
8
|
import { registerMockAdapter } from './chunk-RZVTIR4R.js';
|
|
9
9
|
export { describeDuplicateCopies, getPackageCopies } from './chunk-RZVTIR4R.js';
|
package/dist/svelte.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { vitestMockAdapter } from './chunk-OS2QFTIF.js';
|
|
2
|
-
export { asInstance, asSpy, clearAutoSpy, createMock, createSpyClass, intersectionEntry, mockDeep, resetAutoSpy, stubIntersectionObserver, stubMutationObserver, stubObserver, stubResizeObserver } from './chunk-
|
|
3
|
-
export { createAutoMock, expectEmission, expectEmissions, expectNoEmission } from './chunk-
|
|
2
|
+
export { asInstance, asSpy, clearAutoSpy, createMock, createSpyClass, intersectionEntry, mockDeep, resetAutoSpy, stubIntersectionObserver, stubMutationObserver, stubObserver, stubResizeObserver } from './chunk-MEPJCQZ3.js';
|
|
3
|
+
export { createAutoMock, expectEmission, expectEmissions, expectNoEmission } from './chunk-ZX2JXM5H.js';
|
|
4
4
|
export { countMockedProps, mockAccessorsProp, mockReadonlyProp, mockReadonlyPropGetter, mockValueProp, restoreMockedProps } from './chunk-DNKYISGG.js';
|
|
5
|
-
export { createSpyFromClass } from './chunk-
|
|
6
|
-
export { createFunctionSpy, errorHandler } from './chunk-
|
|
5
|
+
export { createSpyFromClass } from './chunk-M7ZUY64E.js';
|
|
6
|
+
export { createFunctionSpy, errorHandler } from './chunk-SU7S3H4L.js';
|
|
7
7
|
import './chunk-ZJ7NH6LG.js';
|
|
8
8
|
import { registerMockAdapter } from './chunk-RZVTIR4R.js';
|
|
9
9
|
export { describeDuplicateCopies, getPackageCopies } from './chunk-RZVTIR4R.js';
|
package/dist/vue.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { vitestMockAdapter } from './chunk-OS2QFTIF.js';
|
|
2
|
-
export { asInstance, asSpy, clearAutoSpy, createMock, createSpyClass, intersectionEntry, mockDeep, resetAutoSpy, stubIntersectionObserver, stubMutationObserver, stubObserver, stubResizeObserver } from './chunk-
|
|
3
|
-
export { createAutoMock, expectEmission, expectEmissions, expectNoEmission } from './chunk-
|
|
2
|
+
export { asInstance, asSpy, clearAutoSpy, createMock, createSpyClass, intersectionEntry, mockDeep, resetAutoSpy, stubIntersectionObserver, stubMutationObserver, stubObserver, stubResizeObserver } from './chunk-MEPJCQZ3.js';
|
|
3
|
+
export { createAutoMock, expectEmission, expectEmissions, expectNoEmission } from './chunk-ZX2JXM5H.js';
|
|
4
4
|
export { countMockedProps, mockAccessorsProp, mockReadonlyProp, mockReadonlyPropGetter, mockValueProp, restoreMockedProps } from './chunk-DNKYISGG.js';
|
|
5
|
-
import { createSpyFromClass } from './chunk-
|
|
6
|
-
export { createSpyFromClass } from './chunk-
|
|
7
|
-
export { createFunctionSpy, errorHandler } from './chunk-
|
|
5
|
+
import { createSpyFromClass } from './chunk-M7ZUY64E.js';
|
|
6
|
+
export { createSpyFromClass } from './chunk-M7ZUY64E.js';
|
|
7
|
+
export { createFunctionSpy, errorHandler } from './chunk-SU7S3H4L.js';
|
|
8
8
|
import './chunk-ZJ7NH6LG.js';
|
|
9
9
|
import { registerMockAdapter } from './chunk-RZVTIR4R.js';
|
|
10
10
|
export { describeDuplicateCopies, getPackageCopies } from './chunk-RZVTIR4R.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest-auto-spy",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Auto-generate fully-typed test spies from a class — across Vitest, Bun and node:test, with NestJS/React/Vue/Svelte/Angular recipes. Drop-in replacement for jest-auto-spies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"auto-mock",
|
|
@@ -73,9 +73,14 @@
|
|
|
73
73
|
"default": "./dist/bun-angular.js"
|
|
74
74
|
},
|
|
75
75
|
"./node": {
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
"import": {
|
|
77
|
+
"types": "./dist/node.d.ts",
|
|
78
|
+
"default": "./dist/node.js"
|
|
79
|
+
},
|
|
80
|
+
"require": {
|
|
81
|
+
"types": "./dist/node.d.cts",
|
|
82
|
+
"default": "./dist/node.cjs"
|
|
83
|
+
}
|
|
79
84
|
},
|
|
80
85
|
"./rxjs": {
|
|
81
86
|
"types": "./dist/rxjs.d.ts",
|
|
@@ -118,9 +123,14 @@
|
|
|
118
123
|
"default": "./dist/setup.js"
|
|
119
124
|
},
|
|
120
125
|
"./eslint-plugin": {
|
|
121
|
-
"
|
|
122
|
-
|
|
123
|
-
|
|
126
|
+
"import": {
|
|
127
|
+
"types": "./dist/eslint-plugin.d.ts",
|
|
128
|
+
"default": "./dist/eslint-plugin.js"
|
|
129
|
+
},
|
|
130
|
+
"require": {
|
|
131
|
+
"types": "./dist/eslint-plugin.d.cts",
|
|
132
|
+
"default": "./dist/eslint-plugin.cjs"
|
|
133
|
+
}
|
|
124
134
|
}
|
|
125
135
|
},
|
|
126
136
|
"files": [
|