vitest-auto-spy 5.32.1 → 5.33.0
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/AGENTS.md +20 -10
- package/CHANGELOG.md +59 -1
- package/README.md +4 -4
- package/dist/angular-diagnostics.js +10 -10
- package/dist/angular-doubles.js +8 -8
- package/dist/angular-http.js +4 -4
- package/dist/angular-matchers.js +1 -1
- package/dist/angular-router.js +5 -5
- package/dist/angular.d.ts +2 -2
- package/dist/angular.js +5 -1
- package/dist/bun-angular.d.ts +2 -2
- package/dist/bun-angular.js +16 -16
- package/dist/bun.d.ts +1 -1
- package/dist/bun.js +9 -9
- package/dist/{chunk-XUPBHHJD.js → chunk-4AQIDYTD.js} +1 -1
- package/dist/{chunk-F2KBJC7P.js → chunk-4XDGO2IR.js} +1 -1
- package/dist/{chunk-JR55747M.js → chunk-4YZ7PIXM.js} +3 -3
- package/dist/{chunk-LAPHUX5G.js → chunk-7C6PVODW.js} +1 -1
- package/dist/{chunk-7WM3A4IB.js → chunk-ABJTCB5O.js} +2 -2
- package/dist/{chunk-YUGSITWJ.js → chunk-C5H7JCPE.js} +1 -1
- package/dist/{chunk-6JLBZHQ3.js → chunk-DMW7ROVM.js} +2 -2
- package/dist/{chunk-JOPCMFYN.js → chunk-DN4MV4FB.js} +2 -1
- package/dist/{chunk-GSMWYZ5A.js → chunk-GHP66ADY.js} +4 -4
- package/dist/{chunk-CLQUJX6E.js → chunk-HCBVNAMT.js} +1 -1
- package/dist/{chunk-6JQ7AFWM.js → chunk-IH7NDMVG.js} +8 -4
- package/dist/{chunk-72H6HNDI.js → chunk-LGGUCVT5.js} +2 -2
- package/dist/{chunk-DNXCZOYY.js → chunk-NVCLX43M.js} +1 -1
- package/dist/{chunk-24JTFFQL.js → chunk-ON4SQZQL.js} +1 -1
- package/dist/{chunk-XNXIHKVM.js → chunk-TQXPN6GV.js} +1 -1
- package/dist/{chunk-YDPOBKST.js → chunk-UMBYWKKX.js} +3 -3
- package/dist/{chunk-TMFV4DXT.js → chunk-VGC5JZ5R.js} +20 -6
- package/dist/{chunk-2QEM4WP7.js → chunk-YVH6M22H.js} +1 -1
- package/dist/cli.js +2 -1
- package/dist/console.js +7 -7
- package/dist/dom-stubs.d.ts +21 -4
- package/dist/dom-stubs.js +19 -5
- package/dist/eslint-plugin.cjs +7 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +20 -1
- package/dist/jasmine-compat.js +2 -2
- package/dist/jasmine.js +10 -10
- package/dist/nestjs.js +10 -10
- package/dist/node.cjs +20 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +20 -1
- package/dist/{prop-mock-DUcl1uMH.d.ts → prop-mock-DiEcCltd.d.ts} +4 -0
- package/dist/react.d.ts +1 -1
- package/dist/react.js +20 -1
- package/dist/rstest.d.ts +1 -1
- package/dist/rstest.js +9 -9
- package/dist/rxjs.js +2 -2
- package/dist/setup.d.ts +1 -1
- package/dist/setup.js +5 -1
- package/dist/signal-forms.js +1 -1
- package/dist/svelte.d.ts +1 -1
- package/dist/svelte.js +20 -1
- package/dist/{track-signal-runs-BVbIBVS7.d.ts → track-signal-runs-CT3BLyTB.d.ts} +1 -1
- package/dist/vue.d.ts +1 -1
- package/dist/vue.js +20 -1
- package/dist/zone.js +1 -1
- package/package.json +1 -1
- package/skills/vitest-auto-spy/SKILL.md +1 -1
package/AGENTS.md
CHANGED
|
@@ -230,12 +230,17 @@ core re-export, so those suites import it from the root; `spyOnVoidMethod` below
|
|
|
230
230
|
node's prototype chain, and past the component's own class that chain is the engine's: happy-dom's
|
|
231
231
|
`Node.removeChild` calls an internal Symbol-keyed method on the child, and once discovery has
|
|
232
232
|
patched it the strict guard refuses that call — the node cannot be removed from `document.body` at
|
|
233
|
-
all, and the leak then fails later tests in the file far from the cause.
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
233
|
+
all, and the leak then fails later tests in the file far from the cause. Without `onlyMethodsToSpyOn`
|
|
234
|
+
on a live `Node` or another `EventTarget`, the call now reports this itself, before patching
|
|
235
|
+
anything — `warn` by default, or a throw right there under `setMisconfigurationReaction('throw')`.
|
|
236
|
+
The bare-array shorthand does not silence it: `createSpyFromInstance(el, ['addEventListener'])`
|
|
237
|
+
merges as `methodsToSpyOn`, the _additive_ list, so discovery still walks the whole node — only
|
|
238
|
+
`{ onlyMethodsToSpyOn: [...] }` skips it. For a still-attached element, spy one property with
|
|
239
|
+
`mockValueProp(el, 'addEventListener', vi.fn())` (§9) — the node stays otherwise real and removable.
|
|
240
|
+
For a native void method the handler is meant to call (`preventDefault`, `stopPropagation`, `focus`),
|
|
241
|
+
`spyOnVoidMethod(event, 'preventDefault')` packs the whitelist and the
|
|
242
|
+
`returns: { preventDefault: undefined }` seed a strict suite otherwise needs, naming the method once
|
|
243
|
+
instead of twice.
|
|
239
244
|
|
|
240
245
|
**`createFixture<T>(defaults, overrides?)` / `createFixtureFactory<T>(defaults)` are for the model
|
|
241
246
|
that more than one spec builds.** The difference from `createMock` is the `defaults` argument: it is
|
|
@@ -2486,9 +2491,13 @@ it('scrolls after the next frame', () => {
|
|
|
2486
2491
|
`stubAnimationFrame` stubs `cancelAnimationFrame` too, and hands both spies back as
|
|
2487
2492
|
`frames.requestAnimationFrame` / `frames.cancelAnimationFrame`. A frame requested from inside a
|
|
2488
2493
|
running frame is queued in either mode, so a loop that requests its own next frame advances one step
|
|
2489
|
-
per `flush()`.
|
|
2490
|
-
|
|
2491
|
-
|
|
2494
|
+
per `flush()`. A callback that throws stops `flush()` (or propagates out of `requestAnimationFrame`
|
|
2495
|
+
in `'immediate'` mode); pass `onError: (error) => { … }` to intercept it instead — rethrow from
|
|
2496
|
+
inside to keep the default for an error you did not mean to swallow. `stubElementRect` returns a real
|
|
2497
|
+
`DOMRect` per call, edges derived, plus the installed spy as `.getBoundingClientRect` for
|
|
2498
|
+
`expect(el.getBoundingClientRect).toHaveBeenCalled()`, and the return value is still callable as the
|
|
2499
|
+
undo. Both go through `mockValueProp`, so `restoreMockedProps()` (and `setupAutoSpy()` between tests)
|
|
2500
|
+
takes them off; `frames.restore()` does it sooner.
|
|
2492
2501
|
|
|
2493
2502
|
### A module mock that did nothing
|
|
2494
2503
|
|
|
@@ -4000,7 +4009,7 @@ blanket downgrade so those keep their severity; do not copy the two names into a
|
|
|
4000
4009
|
| `prefer-set-inputs` | `warn` | suggest | a run of `fixture.componentRef.setInput('title', v)` on one fixture → `await setInputs(fixture, { title: v })` — the name is resolved against the compiled definition before the first write (an undeclared one is an `NG0303` and no change) and the value is typed. The run collapses into one call and a `detectChanges()` under it goes; offered, not applied, because `stable()` ticks and a zone.js suite answers that with `NG0101` |
|
|
4001
4010
|
| `prefer-spy-on-own-method` | `warn` | `--fix` / suggest | `createSpyFromInstance(x, { onlyMethodsToSpyOn: ['m'], passthrough: true })` read for `m` alone — `.m` on the call, `const { m } = …`, a bare statement, or a name read only as `v.m` → `spyOnOwnMethod(x, 'm')`; the same whitelist with `returns: { m: undefined }` → `spyOnVoidMethod(x, 'm')`. Both fix, import and all; a `Spy<X>` annotation becomes `Spy<X>['m']` in a suggestion. A bare `returns: { m: undefined }` seed is a suggestion, offered only on a real event or element — `new MouseEvent(…)`, `document.createElement(…)`, `fixture.nativeElement` — never on a double |
|
|
4002
4011
|
| `prefer-observer-stub` | `error` | — | a hand-rolled observer global → `stubIntersectionObserver()` / `stubResizeObserver()` / `stubMutationObserver()`; the manual save-and-restore goes too, `restoreMockedProps()` runs the undo |
|
|
4003
|
-
| `no-hand-assigned-global` | `error` | `--fix` | a double assigned to a global (`global.fetch = vi.fn()`, `window.matchMedia = vi.fn()`, `window.localStorage = { getItem: vi.fn() }`) with no restore in `afterEach` / `afterAll` / `onTestFinished` → `mockValueProp(globalThis, name, value)` or `vi.stubGlobal` + `unstubGlobals`; `blockNetwork()` for network globals, `stubWebStorage()` for the storages
|
|
4012
|
+
| `no-hand-assigned-global` | `error` | `--fix` | a double assigned to a global (`global.fetch = vi.fn()`, `window.matchMedia = vi.fn()`, `window.localStorage = { getItem: vi.fn() }`) with no restore in `afterEach` / `afterAll` / `onTestFinished` → `mockValueProp(globalThis, name, value)` or `vi.stubGlobal` + `unstubGlobals`; `blockNetwork()` for network globals, `stubWebStorage()` for the storages, `stubWorker({ respond })` for `Worker`; the three observers stay with `prefer-observer-stub`; any value written into an imported object (`environment.production = true`) → `mockValueProp(environment, 'production', true)`, fixed in a test or `beforeEach` |
|
|
4004
4013
|
| `prefer-stub-response` | `error` | — | an object literal cast to `Response` (`as Response`, `as unknown as Response`, `<Response>{ … }`) or `createMock<Response>(…)` / `createAutoMock<Response>(…)` → `stubResponse({ body })` from `/setup`; the literal answers `undefined` for every member it does not list (`status`, `headers`, `text()`) and the cast is what makes that compile. `Response` must resolve to the **global**, so an Express handler's or a generated client's `Response` is never reported |
|
|
4005
4014
|
| `prefer-provide-activated-route` | `error` | — | a hand-built `ActivatedRoute` — any `useValue` / `useClass` / `useFactory` / `useExisting`, and `provideAutoSpy(ActivatedRoute)` too → `provideActivatedRoute({ … })`; the double knows either the streams or the snapshot, never both, and `injectActivatedRoute().setParams(…)` moves them together mid-test |
|
|
4006
4015
|
| `no-passthrough-console-spy` | `error` | suggest | `vi.spyOn(console, m)` nothing gives an implementation — it calls through and prints → `installConsoleSpies()` + `consoleXSpy`, or `.mockImplementation(() => undefined)` |
|
|
@@ -4260,6 +4269,7 @@ packages, which a subpath export can never be.
|
|
|
4260
4269
|
| `Cannot read properties of undefined (reading 'name')` on `value.constructor.name`, with `createAutoMock<T>()` | `constructor` answered `undefined` on an auto-mock | upgrade — it answers `Object`, as every other double does; or seed it: `createAutoMock<T>({ constructor: … })` |
|
|
4261
4270
|
| `Cannot redefine property: …` from a library accessor spy | the target is an ES module namespace a bundler inlined | no spy library can win this — give the code a real seam (inject it, pass it in) and spy on that |
|
|
4262
4271
|
| `Cannot spy on this instance in place: it is not extensible` | `createSpyFromInstance` was handed a frozen or sealed object | spy it before it is frozen, or build a separate double with `createSpyFromClass` (§2) |
|
|
4272
|
+
| `createSpyFromInstance(X): no onlyMethodsToSpyOn was given for a live DOM/BOM object` | discovery is about to walk the whole prototype chain of a live `Node` / `EventTarget`, engine internals included — the bare-array shorthand does not avoid this, since it merges as `methodsToSpyOn`, not `onlyMethodsToSpyOn` | list the methods the test needs: `{ onlyMethodsToSpyOn: [...] }`; for one method on a node that must keep living a DOM life, `mockValueProp` / `spyOnVoidMethod` instead (§2, live DOM node) |
|
|
4263
4273
|
| `Cannot mock the property 'X': it is not configurable` | the member was defined with `configurable: false`, so it cannot be redefined | members replaced before it are still restorable — `restoreSpiedInstance(instance)` or `restoreMockedProps()` |
|
|
4264
4274
|
| `overrideComponentProvider(…): the override did not apply — C resolved T to …` | the component injects a different token, or something configured the token again after the call; the message says whether the real service or a different double won | pass the token the component actually injects (a base class, an `InjectionToken`), and override after nothing else re-configures |
|
|
4265
4275
|
| `.value() was read while the resource is in the error state: …` | `mockResourceProp`'s double after `fail(reason)`, as a real `ResourceRef` behaves; the reason is on `cause` | branch on `hasValue()` / `status()` first, or assert with `toHaveResourceError()` (§13) |
|
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,62 @@ The latest released version here must always match the one published on
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
## [5.33.0] - 2026-09-26
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **`stubElementRect` hands back the installed `getBoundingClientRect` spy alongside the restore.**
|
|
18
|
+
The return value stays callable — `stubElementRect(el)()` still restores the element's own method —
|
|
19
|
+
and now also carries `.getBoundingClientRect`, for a spec that must assert the measurement happened
|
|
20
|
+
rather than only shape the box it reports.
|
|
21
|
+
|
|
22
|
+
- **`createSpyFromInstance` warns before it patches a live DOM/BOM object without `onlyMethodsToSpyOn`.**
|
|
23
|
+
Full discovery on a live `Node` (or another `EventTarget`) reaches the engine's own prototype chain,
|
|
24
|
+
not just the class's, and can spy a Symbol-keyed internal the engine calls on its own — happy-dom's
|
|
25
|
+
`Node.prototype[Symbol(clearCache)]`, called from `removeChild`, is one. Under a strict double the
|
|
26
|
+
node could then no longer be removed from `document.body`, from inside `removeChild` rather than the
|
|
27
|
+
spec, and the leak cascaded into later tests. The report goes through the same
|
|
28
|
+
`reportMisconfiguration` channel as every other misconfiguration (`warn` by default, `throw` under
|
|
29
|
+
`setMisconfigurationReaction('throw')`), and names `onlyMethodsToSpyOn`, `mockValueProp` and
|
|
30
|
+
`spyOnVoidMethod` as the way to keep the rest of the node real.
|
|
31
|
+
|
|
32
|
+
- **`stubAnimationFrame` takes an `onError` callback.** Called with whatever a frame's callback threw,
|
|
33
|
+
instead of letting it propagate out of `requestAnimationFrame` (in `'immediate'` mode) or stop the
|
|
34
|
+
rest of a `flush()`. Rethrow from inside it to keep the default behaviour for an error the callback
|
|
35
|
+
did not expect — for a component whose zoneless effect re-enters the scheduler on a synchronous
|
|
36
|
+
frame, tolerating that one message without giving up on every other throw.
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- **`prefer-render-shallow` no longer misses a file that reads the template through `hostElement`/
|
|
41
|
+
`queryElement`.** Its own `TEMPLATE_READS` list matched `nativeElement`, `querySelector` and the
|
|
42
|
+
rest of the raw DOM idioms it replaces, but not the helper names themselves — so a spec migrated
|
|
43
|
+
from `fixture.nativeElement` to `hostElement(fixture)` lost the very read that had kept the rule
|
|
44
|
+
quiet, and `TestBed.createComponent` was reported as unnecessary on a file that still measures a
|
|
45
|
+
real element.
|
|
46
|
+
|
|
47
|
+
- **`mockValueProp` no longer throws on a writable, non-configurable property.** It always forced
|
|
48
|
+
`configurable: true`, so `Array.prototype.length` — `{ writable: true, configurable: false }` —
|
|
49
|
+
threw `Cannot redefine property` on every array-length write, even though the runtime allows
|
|
50
|
+
changing the value of a writable-but-non-configurable data property outright. It now keeps
|
|
51
|
+
`configurable: false` when the property already demands it, and only forces `true` when the
|
|
52
|
+
property is new or already configurable. The undo restores the number, not elements a shrink
|
|
53
|
+
already deleted — the array setter's own behaviour, unrelated to this package.
|
|
54
|
+
|
|
55
|
+
## [5.32.2] - 2026-09-25
|
|
56
|
+
|
|
57
|
+
### Fixed
|
|
58
|
+
|
|
59
|
+
- **`no-hand-assigned-global` points a hand-assigned `Worker` at `stubWorker`.** `globalThis.Worker = …`
|
|
60
|
+
got the generic `handAssignedGlobal` message and the `stubConstructor` suggestion; it now gets its own
|
|
61
|
+
message naming `stubWorker({ respond })` from `/dom-stubs`, the way the storages name `stubWebStorage()`.
|
|
62
|
+
|
|
63
|
+
### Docs
|
|
64
|
+
|
|
65
|
+
- **The introduction no longer says the spy is powered by the runner's mock primitive.** Since 4.1 the
|
|
66
|
+
default engine is the library's own mock function; the introduction page and its Russian counterpart
|
|
67
|
+
now say so and name `setSpyEngine('runner')` as the way back to `vi.fn()`.
|
|
68
|
+
|
|
13
69
|
## [5.32.1] - 2026-09-25
|
|
14
70
|
|
|
15
71
|
### Fixed
|
|
@@ -8232,7 +8288,9 @@ by hand there, in more than one place, by more than one person.
|
|
|
8232
8288
|
`mockAccessorsProp`.
|
|
8233
8289
|
- Dual ESM + CJS build with type declarations; 100% test coverage.
|
|
8234
8290
|
|
|
8235
|
-
[Unreleased]: https://github.com/ASDAlexey/vitest-auto-spy/compare/v5.
|
|
8291
|
+
[Unreleased]: https://github.com/ASDAlexey/vitest-auto-spy/compare/v5.33.0...HEAD
|
|
8292
|
+
[5.33.0]: https://github.com/ASDAlexey/vitest-auto-spy/compare/v5.32.2...v5.33.0
|
|
8293
|
+
[5.32.2]: https://github.com/ASDAlexey/vitest-auto-spy/compare/v5.32.1...v5.32.2
|
|
8236
8294
|
[5.32.1]: https://github.com/ASDAlexey/vitest-auto-spy/compare/v5.32.0...v5.32.1
|
|
8237
8295
|
[5.32.0]: https://github.com/ASDAlexey/vitest-auto-spy/compare/v5.31.0...v5.32.0
|
|
8238
8296
|
[5.31.0]: https://github.com/ASDAlexey/vitest-auto-spy/compare/v5.30.0...v5.31.0
|
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ faster at suite scale ([benchmarks](#benchmarks)) — and for
|
|
|
23
23
|
[](https://www.npmjs.com/package/vitest-auto-spy)
|
|
24
24
|
[](https://www.npmjs.com/package/vitest-auto-spy)
|
|
25
25
|
[](https://github.com/ASDAlexey/vitest-auto-spy/actions/workflows/ci.yml)
|
|
26
|
-
[](#install)
|
|
27
27
|
[](https://www.npmjs.com/package/vitest-auto-spy)
|
|
28
28
|
[](https://github.com/ASDAlexey/vitest-auto-spy/actions/workflows/ci.yml)
|
|
29
29
|
[](./LICENSE)
|
|
@@ -3191,8 +3191,8 @@ single-purpose utility you can pick up independently — they all ride on the sa
|
|
|
3191
3191
|
| `stubAbortController()` | `/dom-stubs` | A realm-consistent `AbortController`, so `addEventListener(…, { signal })` works under jsdom + zone.js |
|
|
3192
3192
|
| `stubWebStorage(key?, opts?)` | `/dom-stubs` | An in-memory `localStorage` / `sessionStorage` for this test, with `snapshot()` to assert on ([details](#how-to-mock-localstorage-and-sessionstorage)) |
|
|
3193
3193
|
| `stubWorker(opts?)` | `/dom-stubs` | A `Worker` whose script is the spec — listeners stack, replies arrive on a microtask, `emit()` / `fail()` from the worker's side ([details](#how-to-mock-a-web-worker)) |
|
|
3194
|
-
| `stubAnimationFrame(opts?)` | `/dom-stubs` | `requestAnimationFrame` / `cancelAnimationFrame` run on the spot or on `flush(timestamp?)`; a frame requested inside a frame waits for the next flush
|
|
3195
|
-
| `stubElementRect(el, rect?)` | `/dom-stubs` | `getBoundingClientRect()` answering a real `DOMRect` built from a partial `DOMRectInit`; returns the undo
|
|
3194
|
+
| `stubAnimationFrame(opts?)` | `/dom-stubs` | `requestAnimationFrame` / `cancelAnimationFrame` run on the spot or on `flush(timestamp?)`; a frame requested inside a frame waits for the next flush; `onError` intercepts a throwing callback |
|
|
3195
|
+
| `stubElementRect(el, rect?)` | `/dom-stubs` | `getBoundingClientRect()` answering a real `DOMRect` built from a partial `DOMRectInit`; returns the undo, plus the installed spy as `.getBoundingClientRect` |
|
|
3196
3196
|
| `flushEventLoop(turns?)` / `settleDynamicImport(load, turns?)` | core | Real event-loop turns while the timers are faked — for a dynamic `import()` or native `async` in a dependency |
|
|
3197
3197
|
| `flushEventLoopUntil(isDone, opts?)` | core | Real turns until a condition holds — a `resource()` leaving `loading` — with a budget instead of a hang |
|
|
3198
3198
|
| `stubMediaElement(opts?)` | `/dom-stubs` | A `<video>` / `<audio>` that plays, reports a duration and fires the media events jsdom never does |
|
|
@@ -4216,7 +4216,7 @@ another, and the next one is in that same file.
|
|
|
4216
4216
|
| `stubWebStorage(key?, opts?)` _(`/dom-stubs`)_ | An in-memory `localStorage` / `sessionStorage` a spec installs for itself, seeded or empty; `snapshot()` reads it back as a plain record |
|
|
4217
4217
|
| `stubWorker(opts?)` _(`/dom-stubs`)_ | A `Worker` a spec drives from the worker's side: `respond` per message, `messages` / `terminated` to assert, `emit()` / `fail()`; returns `WorkerStub<TIn, TOut>` |
|
|
4218
4218
|
| `stubAnimationFrame(opts?)` _(`/dom-stubs`)_ | Frames on the spec's schedule: `'immediate'` or `'queued'` + `flush()`, `pending`, both globals as spies; returns `AnimationFrameStub` |
|
|
4219
|
-
| `stubElementRect(el, rect?)` _(`/dom-stubs`)_ | A box for `getBoundingClientRect()` — missing fields `0`, edges derived; returns `
|
|
4219
|
+
| `stubElementRect(el, rect?)` _(`/dom-stubs`)_ | A box for `getBoundingClientRect()` — missing fields `0`, edges derived; returns `ElementRectRestore` (callable undo plus `.getBoundingClientRect`) |
|
|
4220
4220
|
| `createComponentStub(Class, overrides?, opts?)` _(`/angular`)_ | A standalone stand-in for a child component, directive or pipe, built from its compiled definition so the selector cannot drift |
|
|
4221
4221
|
| `flushEventLoop(turns?)` / `settleDynamicImport(load, turns?)` | Real event-loop turns under fake timers; wait for a dynamic `import()` |
|
|
4222
4222
|
| `autoMocked<T>(overrides?, config?)` | `createAutoMock` typed as `T & Spy<T>`; `AutoMocked<T>` names it for a `let` |
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { pendingRequestsReport, assertAngularInternals, instrumentTestBed, onTestingModuleConfigured, onComponentCreated, beforeTestBedReset, verifyOnTeardown } from './chunk-
|
|
2
|
-
export { disableTestBedDiagnostics, enableTestBedDiagnostics, formatSpecTiming, getTestBedTiming, instrumentTestBed, reportSpecTiming } from './chunk-
|
|
3
|
-
import { failOnUnspiedProvider } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
1
|
+
import { pendingRequestsReport, assertAngularInternals, instrumentTestBed, onTestingModuleConfigured, onComponentCreated, beforeTestBedReset, verifyOnTeardown } from './chunk-4XDGO2IR.js';
|
|
2
|
+
export { disableTestBedDiagnostics, enableTestBedDiagnostics, formatSpecTiming, getTestBedTiming, instrumentTestBed, reportSpecTiming } from './chunk-4XDGO2IR.js';
|
|
3
|
+
import { failOnUnspiedProvider } from './chunk-GHP66ADY.js';
|
|
4
|
+
import './chunk-C5H7JCPE.js';
|
|
5
|
+
import './chunk-IH7NDMVG.js';
|
|
6
|
+
import './chunk-UMBYWKKX.js';
|
|
7
|
+
import './chunk-HCBVNAMT.js';
|
|
8
8
|
import './chunk-PC3FAZT3.js';
|
|
9
|
-
import './chunk-
|
|
10
|
-
import { isAutoSpyLike } from './chunk-
|
|
9
|
+
import './chunk-LGGUCVT5.js';
|
|
10
|
+
import { isAutoSpyLike } from './chunk-TQXPN6GV.js';
|
|
11
11
|
import { count, taskName } from './chunk-M3NTXLZG.js';
|
|
12
|
-
import { angularPendingRequests, angularShadowedProviders, angularDeadSchemas, angularNgModuleScopesAuto } from './chunk-
|
|
12
|
+
import { angularPendingRequests, angularShadowedProviders, angularDeadSchemas, angularNgModuleScopesAuto } from './chunk-DN4MV4FB.js';
|
|
13
13
|
import { withDocs } from './chunk-ENCEEH23.js';
|
|
14
14
|
import { getTestBed } from '@angular/core/testing';
|
|
15
15
|
import { beforeEach, afterEach } from 'vitest';
|
package/dist/angular-doubles.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { describeInstance } from './chunk-
|
|
2
|
-
import { useVitestAdapter } from './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { describeInstance } from './chunk-ON4SQZQL.js';
|
|
2
|
+
import { useVitestAdapter } from './chunk-DMW7ROVM.js';
|
|
3
|
+
import './chunk-4YZ7PIXM.js';
|
|
4
4
|
import './chunk-YHDBRBGU.js';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
5
|
+
import './chunk-YVH6M22H.js';
|
|
6
|
+
import './chunk-HCBVNAMT.js';
|
|
7
7
|
import './chunk-PC3FAZT3.js';
|
|
8
|
-
import { createFunctionSpy } from './chunk-
|
|
9
|
-
import './chunk-
|
|
8
|
+
import { createFunctionSpy } from './chunk-LGGUCVT5.js';
|
|
9
|
+
import './chunk-TQXPN6GV.js';
|
|
10
10
|
import './chunk-M3NTXLZG.js';
|
|
11
|
-
import { angularDialog } from './chunk-
|
|
11
|
+
import { angularDialog } from './chunk-DN4MV4FB.js';
|
|
12
12
|
import { withDocs } from './chunk-ENCEEH23.js';
|
|
13
13
|
import { TestBed } from '@angular/core/testing';
|
|
14
14
|
import { ReplaySubject } from 'rxjs';
|
package/dist/angular-http.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { assertAngularInternals, pendingRequestsReport, verifyOnTeardown, beforeTestBedReset } from './chunk-
|
|
2
|
-
import { flushEffects } from './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { assertAngularInternals, pendingRequestsReport, verifyOnTeardown, beforeTestBedReset } from './chunk-4XDGO2IR.js';
|
|
2
|
+
import { flushEffects } from './chunk-NVCLX43M.js';
|
|
3
|
+
import './chunk-C5H7JCPE.js';
|
|
4
4
|
import './chunk-W5EXSI22.js';
|
|
5
5
|
import { count, taskName } from './chunk-M3NTXLZG.js';
|
|
6
|
-
import { angularHttpNoRequest, angularHttpPending, angularHttpController, angularHttpExpectRequest } from './chunk-
|
|
6
|
+
import { angularHttpNoRequest, angularHttpPending, angularHttpController, angularHttpExpectRequest } from './chunk-DN4MV4FB.js';
|
|
7
7
|
import { withDocs } from './chunk-ENCEEH23.js';
|
|
8
8
|
import { provideHttpClient } from '@angular/common/http';
|
|
9
9
|
import { provideHttpClientTesting, HttpTestingController } from '@angular/common/http/testing';
|
package/dist/angular-matchers.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { count } from './chunk-M3NTXLZG.js';
|
|
2
|
-
import { angularDirectiveApplied } from './chunk-
|
|
2
|
+
import { angularDirectiveApplied } from './chunk-DN4MV4FB.js';
|
|
3
3
|
import { withDocs } from './chunk-ENCEEH23.js';
|
|
4
4
|
import '@angular/compiler';
|
|
5
5
|
import { ɵSIGNAL as _SIGNAL, isStandalone } from '@angular/core';
|
package/dist/angular-router.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { describeInstance } from './chunk-
|
|
2
|
-
import { angularInternalsError } from './chunk-
|
|
3
|
-
import { createFunctionSpy } from './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
import { describeInstance } from './chunk-ON4SQZQL.js';
|
|
2
|
+
import { angularInternalsError } from './chunk-C5H7JCPE.js';
|
|
3
|
+
import { createFunctionSpy } from './chunk-LGGUCVT5.js';
|
|
4
|
+
import './chunk-TQXPN6GV.js';
|
|
5
5
|
import { count } from './chunk-M3NTXLZG.js';
|
|
6
|
-
import { angularRouteDouble, angularRouterInject, angularRouterEvents, angularLocationDouble, angularRouteWiring, angularRouterDouble } from './chunk-
|
|
6
|
+
import { angularRouteDouble, angularRouterInject, angularRouterEvents, angularLocationDouble, angularRouteWiring, angularRouterDouble } from './chunk-DN4MV4FB.js';
|
|
7
7
|
import { withDocs } from './chunk-ENCEEH23.js';
|
|
8
8
|
import { TestBed } from '@angular/core/testing';
|
|
9
9
|
import { Router, DefaultUrlSerializer, PRIMARY_OUTLET, RouterState, ActivatedRoute, NavigationEnd, RouterStateSnapshot, ActivatedRouteSnapshot, NavigationStart, NavigationCancel, NavigationError, NavigationSkipped, UrlSegment, VERSION, createUrlTreeFromSnapshot } from '@angular/router';
|
package/dist/angular.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { u as AngularTokenProvider, A as AngularValueProvider, a as AutoSpiedInstance, C as ComponentInputs, b as CreateWithAutoSpiesOptions, E as ElementConstructor, N as NativeElementHolder, R as RenderShallowOptions, c as ResourceStatusLike, d as RunCounter, S as SettleResourceOptions, e as ShallowRender, f as SpyRegistry, g as StableOptions, h as createWithAutoSpies, i as flushEffects, j as hostElement, k as injectSpy, p as provideAutoSpy, v as provideAutoSpyForToken, q as queryElement, r as renderShallow, l as runEffect, s as setInputs, m as settleResource, n as stable, t as trackEffectRuns, o as trackRecomputations } from './track-signal-runs-
|
|
1
|
+
export { u as AngularTokenProvider, A as AngularValueProvider, a as AutoSpiedInstance, C as ComponentInputs, b as CreateWithAutoSpiesOptions, E as ElementConstructor, N as NativeElementHolder, R as RenderShallowOptions, c as ResourceStatusLike, d as RunCounter, S as SettleResourceOptions, e as ShallowRender, f as SpyRegistry, g as StableOptions, h as createWithAutoSpies, i as flushEffects, j as hostElement, k as injectSpy, p as provideAutoSpy, v as provideAutoSpyForToken, q as queryElement, r as renderShallow, l as runEffect, s as setInputs, m as settleResource, n as stable, t as trackEffectRuns, o as trackRecomputations } from './track-signal-runs-CT3BLyTB.js';
|
|
2
2
|
import { InjectionToken, Provider, Type, WritableSignal, Signal } from '@angular/core';
|
|
3
3
|
import { A as AutoMockConfiguration, D as DeepReadonly } from './expect-emission-wUaoy0NW.js';
|
|
4
4
|
export { C as CallbackSubscribable, E as EmissionObserver, c as EmissionOptions, d as EmissionSource, S as SubscribableLike, h as expectAllEmissions, i as expectCompletion, j as expectEmission, k as expectEmissions, l as expectError, m as expectNoEmission, s as setEmissionTimeout } from './expect-emission-wUaoy0NW.js';
|
|
5
5
|
import { o as DeepPartial, C as ClassType, m as ClassSpyConfiguration, S as Spy, s as OnlyMethodKeysOf, h as AddSpyMethodsByReturnTypes, r as NotAPublicKey } from './types-BVKEkhWj.js';
|
|
6
6
|
import { TestAPI } from 'vitest';
|
|
7
7
|
export { I as InjectionLog, T as TrackInjectionsOptions, a as TrackedProvider, t as trackInjections } from './track-injections-DyqkWQmT.js';
|
|
8
|
-
export { A as AccessorImplementations, R as RestoreProp, c as countMockedProps, m as mockAccessorsProp, a as mockReadonlyProp, b as mockReadonlyPropGetter, d as mockValueProp, e as restoreMockedProps } from './prop-mock-
|
|
8
|
+
export { A as AccessorImplementations, R as RestoreProp, c as countMockedProps, m as mockAccessorsProp, a as mockReadonlyProp, b as mockReadonlyPropGetter, d as mockValueProp, e as restoreMockedProps } from './prop-mock-DiEcCltd.js';
|
|
9
9
|
import '@angular/core/testing';
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/angular.js
CHANGED
|
@@ -3007,7 +3007,11 @@ function mockReadonlyPropGetter(object, property, getter) {
|
|
|
3007
3007
|
return applyPatch(object, property, { get: getter, set: void 0, configurable: true }, "mockReadonlyPropGetter");
|
|
3008
3008
|
}
|
|
3009
3009
|
function mockValueProp(object, property, value) {
|
|
3010
|
-
return applyPatch(object, property,
|
|
3010
|
+
return applyPatch(object, property, valueDescriptorFor(object, property, value), "mockValueProp");
|
|
3011
|
+
}
|
|
3012
|
+
function valueDescriptorFor(object, property, value) {
|
|
3013
|
+
const previous = Object.getOwnPropertyDescriptor(object, property);
|
|
3014
|
+
return previous?.configurable === false && previous.writable === true ? { value, writable: true, configurable: false } : { value, writable: true, configurable: true };
|
|
3011
3015
|
}
|
|
3012
3016
|
function mockAccessorsProp(object, property, accessors) {
|
|
3013
3017
|
const adapter = getMockAdapter();
|
package/dist/bun-angular.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ export { A as AccessorKeysOf, a as AddAccessorsSpies, b as AddCalledWithAny, c a
|
|
|
2
2
|
export { AdoptMockOptions, AdoptedMock, ArgCaptor, AsInstances, AssertMockedOptions, CallLog, CaptureArgOptions, ConstructorMock, ConstructorSpy, FixtureFactory, FlushUntilOptions, MockDeepOptions, ModuleNamespace, ModuleNamespaceOptions, SpyClassOptions, adoptMock, asInstance, asInstances, asSpy, assertMocked, captureArg, clearAutoSpy, createFixture, createFixtureFactory, createLog, createMock, createSpyClass, createSpyFromClass, createSpyFromInstance, errorHandler, flushEventLoop, flushEventLoopUntil, mockConstructor, mockDeep, moduleNamespace, narrow, outOfType, resetAutoSpy, restoreSpiedInstance, settleDynamicImport, spyOnOwnMethod, spyOnVoidMethod, stubConstructor, withOverrides } from './bun.js';
|
|
3
3
|
export { A as AutoMockConfiguration, a as AutoMocked, b as AutoSpyDefaultEntry, C as CallbackSubscribable, E as EmissionObserver, c as EmissionOptions, d as EmissionSource, S as SubscribableLike, e as autoMocked, f as clearAutoSpyDefaults, g as createAutoMock, h as expectAllEmissions, i as expectCompletion, j as expectEmission, k as expectEmissions, l as expectError, m as expectNoEmission, r as registerAutoSpyDefaults, s as setEmissionTimeout } from './expect-emission-wUaoy0NW.js';
|
|
4
4
|
export { c as createFunctionSpy, d as describeDuplicateCopies, g as getPackageCopies } from './package-identity-5pFBRWW9.js';
|
|
5
|
-
export { A as AccessorImplementations, O as OutsideHookReaction, R as RestoreProp, c as countMockedProps, m as mockAccessorsProp, a as mockReadonlyProp, b as mockReadonlyPropGetter, d as mockValueProp, r as reportPropsOutsideHooks, e as restoreMockedProps } from './prop-mock-
|
|
6
|
-
export { A as AngularValueProvider, a as AutoSpiedInstance, C as ComponentInputs, b as CreateWithAutoSpiesOptions, E as ElementConstructor, N as NativeElementHolder, R as RenderShallowOptions, c as ResourceStatusLike, d as RunCounter, S as SettleResourceOptions, e as ShallowRender, f as SpyRegistry, g as StableOptions, h as createWithAutoSpies, i as flushEffects, j as hostElement, k as injectSpy, p as provideAutoSpy, q as queryElement, r as renderShallow, l as runEffect, s as setInputs, m as settleResource, n as stable, t as trackEffectRuns, o as trackRecomputations } from './track-signal-runs-
|
|
5
|
+
export { A as AccessorImplementations, O as OutsideHookReaction, R as RestoreProp, c as countMockedProps, m as mockAccessorsProp, a as mockReadonlyProp, b as mockReadonlyPropGetter, d as mockValueProp, r as reportPropsOutsideHooks, e as restoreMockedProps } from './prop-mock-DiEcCltd.js';
|
|
6
|
+
export { A as AngularValueProvider, a as AutoSpiedInstance, C as ComponentInputs, b as CreateWithAutoSpiesOptions, E as ElementConstructor, N as NativeElementHolder, R as RenderShallowOptions, c as ResourceStatusLike, d as RunCounter, S as SettleResourceOptions, e as ShallowRender, f as SpyRegistry, g as StableOptions, h as createWithAutoSpies, i as flushEffects, j as hostElement, k as injectSpy, p as provideAutoSpy, q as queryElement, r as renderShallow, l as runEffect, s as setInputs, m as settleResource, n as stable, t as trackEffectRuns, o as trackRecomputations } from './track-signal-runs-CT3BLyTB.js';
|
|
7
7
|
import 'vitest';
|
|
8
8
|
import '@angular/core';
|
|
9
9
|
import '@angular/core/testing';
|
package/dist/bun-angular.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { createSpyForToken } from './chunk-
|
|
2
|
-
export { injectSpy, provideAutoSpy } from './chunk-
|
|
3
|
-
import { stable, flushEffects } from './chunk-
|
|
4
|
-
export { flushEffects, stable } from './chunk-
|
|
5
|
-
import { angularInternalsError } from './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
export { adoptMock, asInstance, asInstances, asSpy, assertMocked, captureArg, createFixture, createFixtureFactory, createLog, createMock, createSpyClass, createSpyFromInstance, describeDuplicateCopies, expectAllEmissions, expectCompletion, expectEmission, expectEmissions, expectError, expectNoEmission, flushEventLoop, flushEventLoopUntil, getPackageCopies, mockConstructor, mockDeep, moduleNamespace, narrow, outOfType, restoreSpiedInstance, setEmissionTimeout, settleDynamicImport, spyOnOwnMethod, spyOnVoidMethod, stubConstructor, withOverrides } from './chunk-
|
|
8
|
-
import { mockValueProp } from './chunk-
|
|
9
|
-
export { countMockedProps, mockAccessorsProp, mockReadonlyProp, mockReadonlyPropGetter, mockValueProp, reportPropsOutsideHooks, restoreMockedProps } from './chunk-
|
|
10
|
-
import { closestName } from './chunk-
|
|
11
|
-
export { autoMocked, clearAutoSpy, clearAutoSpyDefaults, createAutoMock, createSpyFromClass, registerAutoSpyDefaults, resetAutoSpy } from './chunk-
|
|
1
|
+
import { createSpyForToken } from './chunk-ABJTCB5O.js';
|
|
2
|
+
export { injectSpy, provideAutoSpy } from './chunk-GHP66ADY.js';
|
|
3
|
+
import { stable, flushEffects } from './chunk-NVCLX43M.js';
|
|
4
|
+
export { flushEffects, stable } from './chunk-NVCLX43M.js';
|
|
5
|
+
import { angularInternalsError } from './chunk-C5H7JCPE.js';
|
|
6
|
+
import './chunk-4AQIDYTD.js';
|
|
7
|
+
export { adoptMock, asInstance, asInstances, asSpy, assertMocked, captureArg, createFixture, createFixtureFactory, createLog, createMock, createSpyClass, createSpyFromInstance, describeDuplicateCopies, expectAllEmissions, expectCompletion, expectEmission, expectEmissions, expectError, expectNoEmission, flushEventLoop, flushEventLoopUntil, getPackageCopies, mockConstructor, mockDeep, moduleNamespace, narrow, outOfType, restoreSpiedInstance, setEmissionTimeout, settleDynamicImport, spyOnOwnMethod, spyOnVoidMethod, stubConstructor, withOverrides } from './chunk-VGC5JZ5R.js';
|
|
8
|
+
import { mockValueProp } from './chunk-IH7NDMVG.js';
|
|
9
|
+
export { countMockedProps, mockAccessorsProp, mockReadonlyProp, mockReadonlyPropGetter, mockValueProp, reportPropsOutsideHooks, restoreMockedProps } from './chunk-IH7NDMVG.js';
|
|
10
|
+
import { closestName } from './chunk-UMBYWKKX.js';
|
|
11
|
+
export { autoMocked, clearAutoSpy, clearAutoSpyDefaults, createAutoMock, createSpyFromClass, registerAutoSpyDefaults, resetAutoSpy } from './chunk-UMBYWKKX.js';
|
|
12
12
|
import { fakeClockBacklog } from './chunk-W5EXSI22.js';
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
13
|
+
import './chunk-YVH6M22H.js';
|
|
14
|
+
import './chunk-HCBVNAMT.js';
|
|
15
15
|
import './chunk-PC3FAZT3.js';
|
|
16
|
-
export { createFunctionSpy, errorHandler } from './chunk-
|
|
17
|
-
import { libraryWarn } from './chunk-
|
|
16
|
+
export { createFunctionSpy, errorHandler } from './chunk-LGGUCVT5.js';
|
|
17
|
+
import { libraryWarn } from './chunk-TQXPN6GV.js';
|
|
18
18
|
import { displayPath, count } from './chunk-M3NTXLZG.js';
|
|
19
|
-
import { angularEffects, angularTrackRuns, bunAngular, angularUnreadResource, angularCreateWithAutoSpies, angularResources, angularTypedElements, angularInputs, angularKeepTemplate } from './chunk-
|
|
19
|
+
import { angularEffects, angularTrackRuns, bunAngular, angularUnreadResource, angularCreateWithAutoSpies, angularResources, angularTypedElements, angularInputs, angularKeepTemplate } from './chunk-DN4MV4FB.js';
|
|
20
20
|
import { withDocs } from './chunk-ENCEEH23.js';
|
|
21
21
|
import '@angular/compiler';
|
|
22
22
|
import { NgModule, provideZonelessChangeDetection, Injector, runInInjectionContext, NO_ERRORS_SCHEMA, untracked, ɵSIGNAL as _SIGNAL } from '@angular/core';
|
package/dist/bun.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { z as SpyOptions, C as ClassType, m as ClassSpyConfiguration, s as OnlyM
|
|
|
2
2
|
export { A as AccessorKeysOf, a as AddAccessorsSpies, b as AddCalledWithAny, c as AddCalledWithObservable, d as AddCalledWithPromise, e as AddCalledWithSpyMethods, f as AddObservableSpyMethods, g as AddPromiseSpyMethods, i as AddThrowHelper, j as AddVoidReturnHelpers, k as AnyReturnHelpers, l as AutoSpyRxjsTypes, n as CompleteValueConfig, E as ErrorValueConfig, p as FunctionSpy, M as MethodReturns, q as Mutable, N as NextValueConfig, r as NotAPublicKey, O as ObservableLike, t as OnlyObservablePropsOf, u as OnlyPropsOf, v as Overload, w as OverloadChoice, x as Overloads, P as PropStubValue, y as SpyDisposable, B as StrictSpyConfiguration, G as SubjectLike, H as SubjectOf, U as UnstubbedCall, J as UnstubbedCallHandler, K as UnstubbedRead, L as UnstubbedReadHandler, V as ValueConfig, Q as ValueConfigPerCall, W as WithMockReturnValue } from './types-BVKEkhWj.js';
|
|
3
3
|
export { A as AutoMockConfiguration, a as AutoMocked, b as AutoSpyDefaultEntry, C as CallbackSubscribable, E as EmissionObserver, c as EmissionOptions, d as EmissionSource, S as SubscribableLike, e as autoMocked, f as clearAutoSpyDefaults, g as createAutoMock, h as expectAllEmissions, i as expectCompletion, j as expectEmission, k as expectEmissions, l as expectError, m as expectNoEmission, r as registerAutoSpyDefaults, s as setEmissionTimeout } from './expect-emission-wUaoy0NW.js';
|
|
4
4
|
export { c as createFunctionSpy, d as describeDuplicateCopies, g as getPackageCopies } from './package-identity-5pFBRWW9.js';
|
|
5
|
-
export { A as AccessorImplementations, O as OutsideHookReaction, R as RestoreProp, c as countMockedProps, m as mockAccessorsProp, a as mockReadonlyProp, b as mockReadonlyPropGetter, d as mockValueProp, r as reportPropsOutsideHooks, e as restoreMockedProps } from './prop-mock-
|
|
5
|
+
export { A as AccessorImplementations, O as OutsideHookReaction, R as RestoreProp, c as countMockedProps, m as mockAccessorsProp, a as mockReadonlyProp, b as mockReadonlyPropGetter, d as mockValueProp, r as reportPropsOutsideHooks, e as restoreMockedProps } from './prop-mock-DiEcCltd.js';
|
|
6
6
|
import { Mock, MockInstance } from 'vitest';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/bun.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import './chunk-
|
|
2
|
-
export { adoptMock, asInstance, asInstances, asSpy, assertMocked, captureArg, createFixture, createFixtureFactory, createLog, createMock, createSpyClass, createSpyFromInstance, describeDuplicateCopies, expectAllEmissions, expectCompletion, expectEmission, expectEmissions, expectError, expectNoEmission, flushEventLoop, flushEventLoopUntil, getPackageCopies, mockConstructor, mockDeep, moduleNamespace, narrow, outOfType, restoreSpiedInstance, setEmissionTimeout, settleDynamicImport, spyOnOwnMethod, spyOnVoidMethod, stubConstructor, withOverrides } from './chunk-
|
|
3
|
-
export { countMockedProps, mockAccessorsProp, mockReadonlyProp, mockReadonlyPropGetter, mockValueProp, reportPropsOutsideHooks, restoreMockedProps } from './chunk-
|
|
4
|
-
export { autoMocked, clearAutoSpy, clearAutoSpyDefaults, createAutoMock, createSpyFromClass, registerAutoSpyDefaults, resetAutoSpy } from './chunk-
|
|
1
|
+
import './chunk-4AQIDYTD.js';
|
|
2
|
+
export { adoptMock, asInstance, asInstances, asSpy, assertMocked, captureArg, createFixture, createFixtureFactory, createLog, createMock, createSpyClass, createSpyFromInstance, describeDuplicateCopies, expectAllEmissions, expectCompletion, expectEmission, expectEmissions, expectError, expectNoEmission, flushEventLoop, flushEventLoopUntil, getPackageCopies, mockConstructor, mockDeep, moduleNamespace, narrow, outOfType, restoreSpiedInstance, setEmissionTimeout, settleDynamicImport, spyOnOwnMethod, spyOnVoidMethod, stubConstructor, withOverrides } from './chunk-VGC5JZ5R.js';
|
|
3
|
+
export { countMockedProps, mockAccessorsProp, mockReadonlyProp, mockReadonlyPropGetter, mockValueProp, reportPropsOutsideHooks, restoreMockedProps } from './chunk-IH7NDMVG.js';
|
|
4
|
+
export { autoMocked, clearAutoSpy, clearAutoSpyDefaults, createAutoMock, createSpyFromClass, registerAutoSpyDefaults, resetAutoSpy } from './chunk-UMBYWKKX.js';
|
|
5
5
|
import './chunk-W5EXSI22.js';
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
6
|
+
import './chunk-YVH6M22H.js';
|
|
7
|
+
import './chunk-HCBVNAMT.js';
|
|
8
8
|
import './chunk-PC3FAZT3.js';
|
|
9
|
-
export { createFunctionSpy, errorHandler } from './chunk-
|
|
10
|
-
import './chunk-
|
|
9
|
+
export { createFunctionSpy, errorHandler } from './chunk-LGGUCVT5.js';
|
|
10
|
+
import './chunk-TQXPN6GV.js';
|
|
11
11
|
import './chunk-M3NTXLZG.js';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-DN4MV4FB.js';
|
|
13
13
|
import './chunk-ENCEEH23.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { angularInternalsError } from './chunk-
|
|
1
|
+
import { angularInternalsError } from './chunk-C5H7JCPE.js';
|
|
2
2
|
import { count } from './chunk-M3NTXLZG.js';
|
|
3
3
|
import { TestBed, getTestBed } from '@angular/core/testing';
|
|
4
4
|
import { expect, beforeAll, afterAll } from 'vitest';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DISPOSE } from './chunk-PC3FAZT3.js';
|
|
2
|
-
import { isFastSpy, FAST_SPY_BRAND, isThenable } from './chunk-
|
|
3
|
-
import { setSharedHelperSink, hooksOf } from './chunk-
|
|
4
|
-
import { mockConstructor } from './chunk-
|
|
2
|
+
import { isFastSpy, FAST_SPY_BRAND, isThenable } from './chunk-LGGUCVT5.js';
|
|
3
|
+
import { setSharedHelperSink, hooksOf } from './chunk-TQXPN6GV.js';
|
|
4
|
+
import { mockConstructor } from './chunk-DN4MV4FB.js';
|
|
5
5
|
import { withDocs } from './chunk-ENCEEH23.js';
|
|
6
6
|
|
|
7
7
|
// src/lib/fast-spy.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createSpyFromClass, createAutoMock } from './chunk-
|
|
2
|
-
import { trackInjectionsUntracked } from './chunk-
|
|
1
|
+
import { createSpyFromClass, createAutoMock } from './chunk-UMBYWKKX.js';
|
|
2
|
+
import { trackInjectionsUntracked } from './chunk-DN4MV4FB.js';
|
|
3
3
|
import { withDocs } from './chunk-ENCEEH23.js';
|
|
4
4
|
|
|
5
5
|
// src/lib/track-injections.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { clearAllFastSpies, resetAllFastSpies, getSpyEngine, createFastSpy } from './chunk-
|
|
1
|
+
import { clearAllFastSpies, resetAllFastSpies, getSpyEngine, createFastSpy } from './chunk-4YZ7PIXM.js';
|
|
2
2
|
import { SWEEP_SENTINEL } from './chunk-YHDBRBGU.js';
|
|
3
|
-
import { guardAccessorSpies, spyOnAccessorByRedefine } from './chunk-
|
|
3
|
+
import { guardAccessorSpies, spyOnAccessorByRedefine } from './chunk-YVH6M22H.js';
|
|
4
4
|
import { hasMockAdapter, registerMockAdapter } from './shared-state.js';
|
|
5
5
|
import { vi } from 'vitest';
|
|
6
6
|
|
|
@@ -36,6 +36,7 @@ var createSpyFromClassAccessorSpies = "https://asdalexey.github.io/vitest-auto-s
|
|
|
36
36
|
var createSpyFromClassAccessors = "https://asdalexey.github.io/vitest-auto-spy/core/create-spy-from-class#getterstospyon-accepts-a-signal-valued-getter";
|
|
37
37
|
var createSpyFromClassInstanceMethods = "https://asdalexey.github.io/vitest-auto-spy/core/create-spy-from-class#instancemethodstospyon-\u2014-callables-that-are-not-on-the-prototype";
|
|
38
38
|
var createSpyFromClassLazySpies = "https://asdalexey.github.io/vitest-auto-spy/core/create-spy-from-class#lazy-spies-\u2014-lazyspies";
|
|
39
|
+
var createSpyFromClassLiveDomNode = "https://asdalexey.github.io/vitest-auto-spy/core/create-spy-from-class#live-dom-node";
|
|
39
40
|
var createSpyFromClassReturns = "https://asdalexey.github.io/vitest-auto-spy/core/create-spy-from-class#returns-\u2014-the-value-where-the-spy-is-built";
|
|
40
41
|
var mockConstructor = "https://asdalexey.github.io/vitest-auto-spy/utilities/constructor-doubles#mockconstructor-factory-name";
|
|
41
42
|
var controlHelpers = "https://asdalexey.github.io/vitest-auto-spy/core/control-helpers";
|
|
@@ -63,4 +64,4 @@ var strictModePassthrough = "https://asdalexey.github.io/vitest-auto-spy/core/st
|
|
|
63
64
|
var trackInjectionsUntracked = "https://asdalexey.github.io/vitest-auto-spy/utilities/track-injections#get-on-a-token-that-is-not-tracked";
|
|
64
65
|
var zoneRequirements = "https://asdalexey.github.io/vitest-auto-spy/utilities/zone#requirements";
|
|
65
66
|
|
|
66
|
-
export { adoptMock, angularCreateWithAutoSpies, angularDeadSchemas, angularDialog, angularDirectiveApplied, angularEffects, angularHttpController, angularHttpExpectRequest, angularHttpNoRequest, angularHttpPending, angularInjectSpyReal, angularInputs, angularInternals, angularKeepTemplate, angularLocationDouble, angularNgModuleScopesAuto, angularPendingRequests, angularResources, angularRouteDouble, angularRouteWiring, angularRouterDouble, angularRouterEvents, angularRouterInject, angularShadowedProviders, angularStable, angularTrackRuns, angularTypedElements, angularUnreadResource, autoMockByType, autoMockHeldBack, bunAngular, captureArg, controlHelpers, createSpyFromClass, createSpyFromClassAccessorSpies, createSpyFromClassAccessors, createSpyFromClassInstanceMethods, createSpyFromClassLazySpies, createSpyFromClassReturns, eventLoopUntil, jasmineAutoSpies, jasmineClock, jasmineGlobals, jasmineTimeout, jasmineWithArgs, mockConstructor, moduleMocksAssert, moduleMocksNoOp, mustBeCalledWith, narrow, nestUnitRefusals, nextWithValuesLate, observableFailures, realSeam, setup, setupGlobals, setupWrongHook, signalFormsCreate, signalFormsErrors, strictCall, strictModePassthrough, trackInjectionsUntracked, zoneRequirements };
|
|
67
|
+
export { adoptMock, angularCreateWithAutoSpies, angularDeadSchemas, angularDialog, angularDirectiveApplied, angularEffects, angularHttpController, angularHttpExpectRequest, angularHttpNoRequest, angularHttpPending, angularInjectSpyReal, angularInputs, angularInternals, angularKeepTemplate, angularLocationDouble, angularNgModuleScopesAuto, angularPendingRequests, angularResources, angularRouteDouble, angularRouteWiring, angularRouterDouble, angularRouterEvents, angularRouterInject, angularShadowedProviders, angularStable, angularTrackRuns, angularTypedElements, angularUnreadResource, autoMockByType, autoMockHeldBack, bunAngular, captureArg, controlHelpers, createSpyFromClass, createSpyFromClassAccessorSpies, createSpyFromClassAccessors, createSpyFromClassInstanceMethods, createSpyFromClassLazySpies, createSpyFromClassLiveDomNode, createSpyFromClassReturns, eventLoopUntil, jasmineAutoSpies, jasmineClock, jasmineGlobals, jasmineTimeout, jasmineWithArgs, mockConstructor, moduleMocksAssert, moduleMocksNoOp, mustBeCalledWith, narrow, nestUnitRefusals, nextWithValuesLate, observableFailures, realSeam, setup, setupGlobals, setupWrongHook, signalFormsCreate, signalFormsErrors, strictCall, strictModePassthrough, trackInjectionsUntracked, zoneRequirements };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { currentSpecFile } from './chunk-
|
|
2
|
-
import { createSpyFromClass } from './chunk-
|
|
3
|
-
import { isAutoSpyLike, misconfigurationThrows, reportMisconfiguration } from './chunk-
|
|
4
|
-
import { angularInjectSpyReal } from './chunk-
|
|
1
|
+
import { currentSpecFile } from './chunk-IH7NDMVG.js';
|
|
2
|
+
import { createSpyFromClass } from './chunk-UMBYWKKX.js';
|
|
3
|
+
import { isAutoSpyLike, misconfigurationThrows, reportMisconfiguration } from './chunk-TQXPN6GV.js';
|
|
4
|
+
import { angularInjectSpyReal } from './chunk-DN4MV4FB.js';
|
|
5
5
|
import { withDocs } from './chunk-ENCEEH23.js';
|
|
6
6
|
import { TestBed } from '@angular/core/testing';
|
|
7
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { realSeam, createSpyFromClass, autoMockByType, createSpyFromClassAccessorSpies } from './chunk-
|
|
1
|
+
import { realSeam, createSpyFromClass, autoMockByType, createSpyFromClassAccessorSpies } from './chunk-DN4MV4FB.js';
|
|
2
2
|
import { withDocs } from './chunk-ENCEEH23.js';
|
|
3
3
|
|
|
4
4
|
// src/lib/redefine-failure.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { isCannotRedefine, redefineFailure } from './chunk-
|
|
2
|
-
import { libraryWarn } from './chunk-
|
|
1
|
+
import { isCannotRedefine, redefineFailure } from './chunk-HCBVNAMT.js';
|
|
2
|
+
import { libraryWarn } from './chunk-TQXPN6GV.js';
|
|
3
3
|
import { count, displayPath } from './chunk-M3NTXLZG.js';
|
|
4
|
-
import { setupGlobals, setupWrongHook, setup } from './chunk-
|
|
4
|
+
import { setupGlobals, setupWrongHook, setup } from './chunk-DN4MV4FB.js';
|
|
5
5
|
import { withDocs } from './chunk-ENCEEH23.js';
|
|
6
6
|
import { getMockAdapter } from './shared-state.js';
|
|
7
7
|
|
|
@@ -205,7 +205,11 @@ function mockReadonlyPropGetter(object, property, getter) {
|
|
|
205
205
|
return applyPatch(object, property, { get: getter, set: void 0, configurable: true }, "mockReadonlyPropGetter");
|
|
206
206
|
}
|
|
207
207
|
function mockValueProp(object, property, value) {
|
|
208
|
-
return applyPatch(object, property,
|
|
208
|
+
return applyPatch(object, property, valueDescriptorFor(object, property, value), "mockValueProp");
|
|
209
|
+
}
|
|
210
|
+
function valueDescriptorFor(object, property, value) {
|
|
211
|
+
const previous = Object.getOwnPropertyDescriptor(object, property);
|
|
212
|
+
return previous?.configurable === false && previous.writable === true ? { value, writable: true, configurable: false } : { value, writable: true, configurable: true };
|
|
209
213
|
}
|
|
210
214
|
function mockAccessorsProp(object, property, accessors) {
|
|
211
215
|
const adapter = getMockAdapter();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AUTO_SPY_MARK, attachHelpers, markAsMock, reportMisconfiguration, detachedHelperError, decorate } from './chunk-
|
|
1
|
+
import { AUTO_SPY_MARK, attachHelpers, markAsMock, reportMisconfiguration, detachedHelperError, decorate } from './chunk-TQXPN6GV.js';
|
|
2
2
|
import { displayPath } from './chunk-M3NTXLZG.js';
|
|
3
|
-
import { mustBeCalledWith, strictCall, createSpyFromClass } from './chunk-
|
|
3
|
+
import { mustBeCalledWith, strictCall, createSpyFromClass } from './chunk-DN4MV4FB.js';
|
|
4
4
|
import { withDocs } from './chunk-ENCEEH23.js';
|
|
5
5
|
import { getMockAdapter, getObservableSupport, getJasmineSupport, requireObservableSupport } from './shared-state.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { unpatchedSetTimeout, unpatchedClearTimeout, fakeClockBacklog } from './chunk-W5EXSI22.js';
|
|
2
2
|
import { count } from './chunk-M3NTXLZG.js';
|
|
3
|
-
import { angularStable } from './chunk-
|
|
3
|
+
import { angularStable } from './chunk-DN4MV4FB.js';
|
|
4
4
|
import { withDocs } from './chunk-ENCEEH23.js';
|
|
5
5
|
import { NgZone } from '@angular/core';
|
|
6
6
|
import { TestBed } from '@angular/core/testing';
|