@codefast/di-testing 0.1.2 → 0.1.4
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/CHANGELOG.md +43 -0
- package/LICENSE +1 -1
- package/README.md +5 -5
- package/dist/discovery/dependency-scanner.js +1 -1
- package/dist/discovery/mock-binder.d.ts +1 -1
- package/dist/discovery/mock-binder.js +2 -2
- package/dist/index.d.ts +15 -15
- package/dist/index.js +5 -5
- package/dist/mocking/auto-mock.d.ts +2 -2
- package/dist/mocking/mock-factory.d.ts +1 -1
- package/dist/mocking/mock-factory.js +1 -1
- package/dist/test-bed/bed-builder.d.ts +5 -5
- package/dist/test-bed/bed-builder.js +2 -2
- package/dist/test-bed/sociable-builder.d.ts +6 -6
- package/dist/test-bed/sociable-builder.js +5 -5
- package/dist/test-bed/solitary-builder.d.ts +6 -6
- package/dist/test-bed/solitary-builder.js +4 -4
- package/dist/test-bed/test-bed.d.ts +5 -5
- package/dist/test-bed/test-bed.js +2 -2
- package/dist/test-bed/unit-test-bed.d.ts +4 -4
- package/dist/test-bed/unit-test-bed.js +3 -3
- package/package.json +9 -35
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @codefast/di-testing
|
|
2
2
|
|
|
3
|
+
## 0.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#892](https://github.com/codefastlabs/codefast/pull/892) [`4c97c5b`](https://github.com/codefastlabs/codefast/commit/4c97c5b8c2314f25ee9df7eac5a4b5dd723d6d90) Thanks [@thevuong](https://github.com/thevuong)! - Lower the monorepo's Node floor from 24 to 22.12, so the packages install and run on the active Node 22 LTS line.
|
|
8
|
+
|
|
9
|
+
`engines.node` becomes `>=22.12.0` across every package — the floor the shared toolchain (oxlint, Vite, Vitest, TanStack
|
|
10
|
+
Start) already requires. Development stays on the latest Node (`.node-version`) for speed, and a CI matrix exercises the
|
|
11
|
+
floor and the active LTS directly, so the floor is a contract CI proves rather than one everyone has to run.
|
|
12
|
+
`@types/node` is pinned to the floor's major (`^22`), with a workspace override holding the whole tree there so a dev
|
|
13
|
+
tool's `@types/node: "*"` peer can no longer pull a newer major and mask an API the floor lacks. The floor stays
|
|
14
|
+
mechanical, not advisory: `@codefast/di` keeps its own `Map` upsert helpers rather than the ES2025
|
|
15
|
+
`Map.prototype.getOrInsert` (which would raise the floor to 26) and its `lib` stays `ES2024`. `@codefast/cli`'s mirror
|
|
16
|
+
step now calls the `node:path` functions directly instead of aliasing them, which the floor's types correctly flag as
|
|
17
|
+
unbound methods.
|
|
18
|
+
|
|
19
|
+
The shared `@codefast/typescript-config` presets pin `lib` and `target` to `ES2024` (was `ESNext`) so the compiler's
|
|
20
|
+
ECMAScript surface matches the Node floor: an ES2025 builtin such as `Map.prototype.getOrInsert` now fails to type-check
|
|
21
|
+
rather than compiling and crashing on Node 22.12. `@codefast/di` and `@codefast/di-testing` already pinned `lib` and are
|
|
22
|
+
unchanged.
|
|
23
|
+
|
|
24
|
+
Internal subpath imports move from a `#/` prefix to a bare `#` (`#core/token`, not `#/core/token`), and the
|
|
25
|
+
`package.json#imports` keys become `#*`/`#tests/*`/`#examples/*` to match. Node's native ESM resolver rejects a
|
|
26
|
+
`#/`-prefixed specifier with `ERR_INVALID_MODULE_SPECIFIER` on the whole Node 22 line (and on Node 24 before 24.14), and
|
|
27
|
+
each package ships those specifiers verbatim inside its published `dist/*.js` for a consumer's Node to resolve — so this
|
|
28
|
+
rename is what actually lets the packages import on the new floor. Purely internal: a consumer's own import paths are
|
|
29
|
+
unchanged.
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [[`4c97c5b`](https://github.com/codefastlabs/codefast/commit/4c97c5b8c2314f25ee9df7eac5a4b5dd723d6d90)]:
|
|
32
|
+
- @codefast/di@0.10.1
|
|
33
|
+
|
|
34
|
+
## 0.1.3
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- [#827](https://github.com/codefastlabs/codefast/pull/827) [`0984174`](https://github.com/codefastlabs/codefast/commit/0984174df148a7cffcd09b837bdde1922f38f24e) Thanks [@thevuong](https://github.com/thevuong)! - `package.json` now carries `homepage` and `bugs`, so npm links the package README and the issue tracker the way the
|
|
39
|
+
other `@codefast/*` packages already do.
|
|
40
|
+
|
|
41
|
+
- [#848](https://github.com/codefastlabs/codefast/pull/848) [`ffb61a0`](https://github.com/codefastlabs/codefast/commit/ffb61a094aefb77d68dd13af7dba96ffdee6f5f2) Thanks [@thevuong](https://github.com/thevuong)! - README samples declare tokens with a `<namespace>:<Name>` display name, matching the convention `@codefast/di`
|
|
42
|
+
documents.
|
|
43
|
+
- Updated dependencies [[`0984174`](https://github.com/codefastlabs/codefast/commit/0984174df148a7cffcd09b837bdde1922f38f24e), [`d0b794c`](https://github.com/codefastlabs/codefast/commit/d0b794c047344c4040b5641202c259d72a0ea48c)]:
|
|
44
|
+
- @codefast/di@0.9.0
|
|
45
|
+
|
|
3
46
|
## 0.1.2
|
|
4
47
|
|
|
5
48
|
### Patch Changes
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ production — and you assert against the mocks the bed created.
|
|
|
31
31
|
pnpm add -D @codefast/di-testing
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
`@codefast/di-testing` requires Node.js
|
|
34
|
+
`@codefast/di-testing` requires Node.js 22.12 or later and a peer install of `@codefast/di` (`>=0.8.0`), with the same
|
|
35
35
|
TypeScript setup: native Stage 3 decorators, `experimentalDecorators` off. The package is published on 0.x and versioned
|
|
36
36
|
on its own track: breaking changes ship as minor versions, so pin the minor version when you need stability.
|
|
37
37
|
|
|
@@ -52,9 +52,9 @@ interface EmailService {
|
|
|
52
52
|
send(to: string, body: string): void;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
const UserServiceToken = token<UserService>("UserService");
|
|
56
|
-
const PaymentGatewayToken = token<PaymentGateway>("PaymentGateway");
|
|
57
|
-
const EmailServiceToken = token<EmailService>("EmailService");
|
|
55
|
+
const UserServiceToken = token<UserService>("app:UserService");
|
|
56
|
+
const PaymentGatewayToken = token<PaymentGateway>("app:PaymentGateway");
|
|
57
|
+
const EmailServiceToken = token<EmailService>("app:EmailService");
|
|
58
58
|
|
|
59
59
|
@injectable([UserServiceToken, PaymentGatewayToken, EmailServiceToken])
|
|
60
60
|
class OrderProcessor {
|
|
@@ -139,7 +139,7 @@ interface TaxPolicy {
|
|
|
139
139
|
rateFor(currency: string): number;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
const TaxPolicyToken = token<TaxPolicy>("TaxPolicy");
|
|
142
|
+
const TaxPolicyToken = token<TaxPolicy>("app:TaxPolicy");
|
|
143
143
|
|
|
144
144
|
@injectable([TaxPolicyToken])
|
|
145
145
|
class PricingService {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Reads the dependencies a class declares, the input every auto-mock is built from. */
|
|
2
|
-
import { NotInjectableError } from "
|
|
2
|
+
import { NotInjectableError } from "#errors/errors";
|
|
3
3
|
/**
|
|
4
4
|
* Reads every dependency a class declares — constructor parameters first, then accessor injections.
|
|
5
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Binds a unit's discovered dependencies onto a container as mocks — the sole container coupling. */
|
|
2
2
|
import type { BindingTag, Constructor, Container, DependencyKey, DependencySlot, InjectOptions } from "@codefast/di";
|
|
3
|
-
import type { MockFactory } from "
|
|
3
|
+
import type { MockFactory } from "#mocking/mock-factory";
|
|
4
4
|
/**
|
|
5
5
|
* How one dependency is supplied instead of a plain auto-mock.
|
|
6
6
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Binds a unit's discovered dependencies onto a container as mocks — the sole container coupling. */
|
|
2
2
|
import { slotName, tokenName } from "@codefast/di";
|
|
3
|
-
import { OverrideMismatchError, UndeclaredDependencyError } from "
|
|
4
|
-
import { createAutoMock } from "
|
|
3
|
+
import { OverrideMismatchError, UndeclaredDependencyError } from "#errors/errors";
|
|
4
|
+
import { createAutoMock } from "#mocking/auto-mock";
|
|
5
5
|
/** The name prefix `usingAll` elements are bound under, so identical constants keep distinct slots. */
|
|
6
6
|
const ALL_ELEMENT_SLOT_PREFIX = "di-testing:all:";
|
|
7
7
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/** Solitary and sociable auto-mocking test beds for `@codefast/di`. */
|
|
2
|
-
export { TestBed } from "
|
|
3
|
-
export type { TestBedStatic } from "
|
|
4
|
-
export type { MockOverrideBuilder, PreparedBed, TestBedOptions } from "
|
|
5
|
-
export type { SolitaryTestBedBuilder } from "
|
|
6
|
-
export type { SociableTestBedBuilder } from "
|
|
7
|
-
export type { SociableUnitTestBed, UnitReference, UnitTestBed } from "
|
|
8
|
-
export { createAutoMock, MOCK_RESET } from "
|
|
9
|
-
export type { DeepPartial, Mocked } from "
|
|
10
|
-
export { defaultMockFactory } from "
|
|
11
|
-
export type { MockFactory, MockFunction } from "
|
|
12
|
-
export { createSpy } from "
|
|
13
|
-
export type { Spy, SpyResult, SpyState } from "
|
|
14
|
-
export type { InjectionIdentifier } from "
|
|
15
|
-
export { ExposureError, NotInjectableError, OverrideMismatchError, SealedDependencyError, TestingError, UndeclaredDependencyError, } from "
|
|
16
|
-
export type { SealedCause } from "
|
|
2
|
+
export { TestBed } from "#test-bed/test-bed";
|
|
3
|
+
export type { TestBedStatic } from "#test-bed/test-bed";
|
|
4
|
+
export type { MockOverrideBuilder, PreparedBed, TestBedOptions } from "#test-bed/bed-builder";
|
|
5
|
+
export type { SolitaryTestBedBuilder } from "#test-bed/solitary-builder";
|
|
6
|
+
export type { SociableTestBedBuilder } from "#test-bed/sociable-builder";
|
|
7
|
+
export type { SociableUnitTestBed, UnitReference, UnitTestBed } from "#test-bed/unit-test-bed";
|
|
8
|
+
export { createAutoMock, MOCK_RESET } from "#mocking/auto-mock";
|
|
9
|
+
export type { DeepPartial, Mocked } from "#mocking/auto-mock";
|
|
10
|
+
export { defaultMockFactory } from "#mocking/mock-factory";
|
|
11
|
+
export type { MockFactory, MockFunction } from "#mocking/mock-factory";
|
|
12
|
+
export { createSpy } from "#mocking/spy";
|
|
13
|
+
export type { Spy, SpyResult, SpyState } from "#mocking/spy";
|
|
14
|
+
export type { InjectionIdentifier } from "#types";
|
|
15
|
+
export { ExposureError, NotInjectableError, OverrideMismatchError, SealedDependencyError, TestingError, UndeclaredDependencyError, } from "#errors/errors";
|
|
16
|
+
export type { SealedCause } from "#errors/errors";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Solitary and sociable auto-mocking test beds for `@codefast/di`. */
|
|
2
|
-
export { TestBed } from "
|
|
3
|
-
export { createAutoMock, MOCK_RESET } from "
|
|
4
|
-
export { defaultMockFactory } from "
|
|
5
|
-
export { createSpy } from "
|
|
6
|
-
export { ExposureError, NotInjectableError, OverrideMismatchError, SealedDependencyError, TestingError, UndeclaredDependencyError, } from "
|
|
2
|
+
export { TestBed } from "#test-bed/test-bed";
|
|
3
|
+
export { createAutoMock, MOCK_RESET } from "#mocking/auto-mock";
|
|
4
|
+
export { defaultMockFactory } from "#mocking/mock-factory";
|
|
5
|
+
export { createSpy } from "#mocking/spy";
|
|
6
|
+
export { ExposureError, NotInjectableError, OverrideMismatchError, SealedDependencyError, TestingError, UndeclaredDependencyError, } from "#errors/errors";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** The lazy `Proxy` that mocks an erased interface one accessed property at a time. */
|
|
2
|
-
import type { MockFactory, MockFunction } from "
|
|
3
|
-
import type { Spy } from "
|
|
2
|
+
import type { MockFactory, MockFunction } from "#mocking/mock-factory";
|
|
3
|
+
import type { Spy } from "#mocking/spy";
|
|
4
4
|
/**
|
|
5
5
|
* A mocked view of `Dependency`: every member becomes a spy, nested objects are mocked in turn.
|
|
6
6
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The pluggable seam that decides which spy backend the auto-mocks are built from. */
|
|
2
|
-
import { createSpy } from "
|
|
2
|
+
import { createSpy } from "#mocking/spy";
|
|
3
3
|
/**
|
|
4
4
|
* The default `MockFactory` — one built-in {@link Spy} per call, with no test-framework dependency.
|
|
5
5
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** The override-recording core both test-bed builders extend. */
|
|
2
2
|
import type { Constructor, Container, DependencyKey, InjectOptions, MetadataReader } from "@codefast/di";
|
|
3
|
-
import type { BoundMock, SlottedOverride } from "
|
|
4
|
-
import type { DeepPartial } from "
|
|
5
|
-
import type { MockFactory, MockFunction } from "
|
|
6
|
-
import type { Spy } from "
|
|
7
|
-
import type { InjectionIdentifier } from "
|
|
3
|
+
import type { BoundMock, SlottedOverride } from "#discovery/mock-binder";
|
|
4
|
+
import type { DeepPartial } from "#mocking/auto-mock";
|
|
5
|
+
import type { MockFactory, MockFunction } from "#mocking/mock-factory";
|
|
6
|
+
import type { Spy } from "#mocking/spy";
|
|
7
|
+
import type { InjectionIdentifier } from "#types";
|
|
8
8
|
/**
|
|
9
9
|
* Options that configure a whole test-bed compile.
|
|
10
10
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** The override-recording core both test-bed builders extend. */
|
|
2
2
|
import { defaultMetadataReader } from "@codefast/di";
|
|
3
3
|
import { verifyingMetadataReader } from "@codefast/di/metadata/verifying-metadata-reader";
|
|
4
|
-
import { criteriaEquals, normalizeCriteria } from "
|
|
5
|
-
import { defaultMockFactory } from "
|
|
4
|
+
import { criteriaEquals, normalizeCriteria } from "#discovery/mock-binder";
|
|
5
|
+
import { defaultMockFactory } from "#mocking/mock-factory";
|
|
6
6
|
/**
|
|
7
7
|
* The shared builder core: records overrides, resolves the reader and mock factory, and owns the
|
|
8
8
|
* compile template that disposes the container when a build fails.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** The fluent builder that compiles a unit together with chosen real collaborators. */
|
|
2
2
|
import type { Constructor, InjectOptions } from "@codefast/di";
|
|
3
|
-
import type { MockFunction } from "
|
|
4
|
-
import type { Spy } from "
|
|
5
|
-
import type { MockOverrideBuilder } from "
|
|
6
|
-
import { BedBuilder } from "
|
|
7
|
-
import type { SociableUnitTestBed } from "
|
|
8
|
-
import type { InjectionIdentifier } from "
|
|
3
|
+
import type { MockFunction } from "#mocking/mock-factory";
|
|
4
|
+
import type { Spy } from "#mocking/spy";
|
|
5
|
+
import type { MockOverrideBuilder } from "#test-bed/bed-builder";
|
|
6
|
+
import { BedBuilder } from "#test-bed/bed-builder";
|
|
7
|
+
import type { SociableUnitTestBed } from "#test-bed/unit-test-bed";
|
|
8
|
+
import type { InjectionIdentifier } from "#types";
|
|
9
9
|
/**
|
|
10
10
|
* A sociable build in progress: expose real collaborators, override the rest, then compile.
|
|
11
11
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** The fluent builder that compiles a unit together with chosen real collaborators. */
|
|
2
2
|
import { Container, token } from "@codefast/di";
|
|
3
|
-
import { scanSociableDependencies } from "
|
|
4
|
-
import { bindMocks } from "
|
|
5
|
-
import { ExposureError } from "
|
|
6
|
-
import { BedBuilder } from "
|
|
7
|
-
import { createSociableUnitTestBed, createUnitTestBed } from "
|
|
3
|
+
import { scanSociableDependencies } from "#discovery/dependency-scanner";
|
|
4
|
+
import { bindMocks } from "#discovery/mock-binder";
|
|
5
|
+
import { ExposureError } from "#errors/errors";
|
|
6
|
+
import { BedBuilder } from "#test-bed/bed-builder";
|
|
7
|
+
import { createSociableUnitTestBed, createUnitTestBed } from "#test-bed/unit-test-bed";
|
|
8
8
|
/**
|
|
9
9
|
* The default {@link SociableTestBedBuilder}, backed by a fresh container per compile.
|
|
10
10
|
*
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** The fluent builder that compiles a solitary unit under test. */
|
|
2
2
|
import type { InjectOptions } from "@codefast/di";
|
|
3
|
-
import type { MockFunction } from "
|
|
4
|
-
import type { Spy } from "
|
|
5
|
-
import type { MockOverrideBuilder } from "
|
|
6
|
-
import { BedBuilder } from "
|
|
7
|
-
import type { UnitTestBed } from "
|
|
8
|
-
import type { InjectionIdentifier } from "
|
|
3
|
+
import type { MockFunction } from "#mocking/mock-factory";
|
|
4
|
+
import type { Spy } from "#mocking/spy";
|
|
5
|
+
import type { MockOverrideBuilder } from "#test-bed/bed-builder";
|
|
6
|
+
import { BedBuilder } from "#test-bed/bed-builder";
|
|
7
|
+
import type { UnitTestBed } from "#test-bed/unit-test-bed";
|
|
8
|
+
import type { InjectionIdentifier } from "#types";
|
|
9
9
|
/**
|
|
10
10
|
* A solitary build in progress: register overrides, then compile.
|
|
11
11
|
*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** The fluent builder that compiles a solitary unit under test. */
|
|
2
2
|
import { Container } from "@codefast/di";
|
|
3
|
-
import { scanDependencies } from "
|
|
4
|
-
import { bindMocks } from "
|
|
5
|
-
import { BedBuilder } from "
|
|
6
|
-
import { createUnitTestBed } from "
|
|
3
|
+
import { scanDependencies } from "#discovery/dependency-scanner";
|
|
4
|
+
import { bindMocks } from "#discovery/mock-binder";
|
|
5
|
+
import { BedBuilder } from "#test-bed/bed-builder";
|
|
6
|
+
import { createUnitTestBed } from "#test-bed/unit-test-bed";
|
|
7
7
|
/**
|
|
8
8
|
* The default {@link SolitaryTestBedBuilder}, backed by a fresh container per compile.
|
|
9
9
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** The entry point for building isolated units under test. */
|
|
2
2
|
import type { Constructor } from "@codefast/di";
|
|
3
|
-
import type { MockFunction } from "
|
|
4
|
-
import type { Spy } from "
|
|
5
|
-
import type { TestBedOptions } from "
|
|
6
|
-
import type { SociableTestBedBuilder } from "
|
|
7
|
-
import type { SolitaryTestBedBuilder } from "
|
|
3
|
+
import type { MockFunction } from "#mocking/mock-factory";
|
|
4
|
+
import type { Spy } from "#mocking/spy";
|
|
5
|
+
import type { TestBedOptions } from "#test-bed/bed-builder";
|
|
6
|
+
import type { SociableTestBedBuilder } from "#test-bed/sociable-builder";
|
|
7
|
+
import type { SolitaryTestBedBuilder } from "#test-bed/solitary-builder";
|
|
8
8
|
/**
|
|
9
9
|
* The factory surface for building isolated units under test.
|
|
10
10
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** The entry point for building isolated units under test. */
|
|
2
|
-
import { SociableBuilder } from "
|
|
3
|
-
import { SolitaryBuilder } from "
|
|
2
|
+
import { SociableBuilder } from "#test-bed/sociable-builder";
|
|
3
|
+
import { SolitaryBuilder } from "#test-bed/solitary-builder";
|
|
4
4
|
/**
|
|
5
5
|
* Entry point for auto-mocking a class in isolation from its collaborators.
|
|
6
6
|
*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** The compiled result of a test bed: the real unit plus handles to its mocks. */
|
|
2
2
|
import type { Constructor, Container, DependencyKey, InjectOptions, TokenValue } from "@codefast/di";
|
|
3
|
-
import type { BoundMock } from "
|
|
4
|
-
import type { Mocked } from "
|
|
5
|
-
import type { MockFunction } from "
|
|
6
|
-
import type { Spy } from "
|
|
3
|
+
import type { BoundMock } from "#discovery/mock-binder";
|
|
4
|
+
import type { Mocked } from "#mocking/auto-mock";
|
|
5
|
+
import type { MockFunction } from "#mocking/mock-factory";
|
|
6
|
+
import type { Spy } from "#mocking/spy";
|
|
7
7
|
/**
|
|
8
8
|
* A lookup from a dependency's token or class to the mock the unit was built with.
|
|
9
9
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
2
|
import { tokenName } from "@codefast/di";
|
|
3
|
-
import { criteriaEquals, normalizeCriteria } from "
|
|
4
|
-
import { ExposureError, SealedDependencyError, UndeclaredDependencyError } from "
|
|
5
|
-
import { MOCK_RESET } from "
|
|
3
|
+
import { criteriaEquals, normalizeCriteria } from "#discovery/mock-binder";
|
|
4
|
+
import { ExposureError, SealedDependencyError, UndeclaredDependencyError } from "#errors/errors";
|
|
5
|
+
import { MOCK_RESET } from "#mocking/auto-mock";
|
|
6
6
|
/**
|
|
7
7
|
* Wraps a compiled bed with access to its exposed real collaborators.
|
|
8
8
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codefast/di-testing",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Solitary and sociable auto-mocking test beds for @codefast/di",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"auto-mock",
|
|
@@ -13,8 +13,12 @@
|
|
|
13
13
|
"testing",
|
|
14
14
|
"typescript"
|
|
15
15
|
],
|
|
16
|
+
"homepage": "https://github.com/codefastlabs/codefast/tree/main/packages/di-testing#readme",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/codefastlabs/codefast/issues"
|
|
19
|
+
},
|
|
16
20
|
"license": "MIT",
|
|
17
|
-
"author": "Vuong Phan <mr.thevuong@gmail.com>",
|
|
21
|
+
"author": "Vuong Phan <mr.thevuong@gmail.com> (https://github.com/thevuong)",
|
|
18
22
|
"repository": {
|
|
19
23
|
"type": "git",
|
|
20
24
|
"url": "git+https://github.com/codefastlabs/codefast.git",
|
|
@@ -32,14 +36,7 @@
|
|
|
32
36
|
"module": "./dist/index.js",
|
|
33
37
|
"types": "./dist/index.d.ts",
|
|
34
38
|
"imports": {
|
|
35
|
-
"
|
|
36
|
-
"./tests/*",
|
|
37
|
-
"./tests/*.ts",
|
|
38
|
-
"./tests/*.tsx",
|
|
39
|
-
"./tests/*/index.ts",
|
|
40
|
-
"./tests/*/index.tsx"
|
|
41
|
-
],
|
|
42
|
-
"#/*": {
|
|
39
|
+
"#*": {
|
|
43
40
|
"types": "./dist/*.d.ts",
|
|
44
41
|
"default": "./dist/*.js"
|
|
45
42
|
}
|
|
@@ -102,33 +99,10 @@
|
|
|
102
99
|
"publishConfig": {
|
|
103
100
|
"access": "public"
|
|
104
101
|
},
|
|
105
|
-
"devDependencies": {
|
|
106
|
-
"@babel/core": "^8.0.1",
|
|
107
|
-
"@babel/plugin-proposal-decorators": "8.0.2",
|
|
108
|
-
"@rolldown/plugin-babel": "^0.2.3",
|
|
109
|
-
"@types/node": "^26.4.1",
|
|
110
|
-
"@vitest/coverage-v8": "^5.0.0",
|
|
111
|
-
"typescript": "^7.0.2",
|
|
112
|
-
"vitest": "^5.0.0",
|
|
113
|
-
"@codefast/typescript-config": "0.9.0",
|
|
114
|
-
"@codefast/di": "0.8.1"
|
|
115
|
-
},
|
|
116
102
|
"peerDependencies": {
|
|
117
|
-
"@codefast/di": ">=0.
|
|
103
|
+
"@codefast/di": ">=0.10.1"
|
|
118
104
|
},
|
|
119
105
|
"engines": {
|
|
120
|
-
"node": ">=
|
|
121
|
-
},
|
|
122
|
-
"scripts": {
|
|
123
|
-
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
124
|
-
"check-types": "tsc --noEmit",
|
|
125
|
-
"clean": "rm -rf dist",
|
|
126
|
-
"test": "vitest run",
|
|
127
|
-
"test:coverage": "vitest run --coverage",
|
|
128
|
-
"test:e2e": "vitest run tests/e2e",
|
|
129
|
-
"test:integration": "vitest run tests/integration",
|
|
130
|
-
"test:type": "vitest run tests/types",
|
|
131
|
-
"test:unit": "vitest run tests/unit",
|
|
132
|
-
"test:watch": "vitest"
|
|
106
|
+
"node": ">=22.12.0"
|
|
133
107
|
}
|
|
134
108
|
}
|