@noego/testing 0.7.1 → 0.7.2
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/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1382,10 +1382,10 @@ function resolveTestOverlays(stub, catalogs) {
|
|
|
1382
1382
|
const result = [];
|
|
1383
1383
|
for (const entry of stubEntries(stub)) {
|
|
1384
1384
|
let candidates = catalogs.filter((c) => owns(c, entry) && (entry.owner === void 0 || c.owner === entry.owner));
|
|
1385
|
-
if (candidates.length === 0 && entry.kind !== "middleware" && entry.kind !== "load" && typeof entry.target === "function") {
|
|
1385
|
+
if (candidates.length === 0 && entry.kind !== "middleware" && entry.kind !== "load" && (typeof entry.target === "function" || entry.kind === "value")) {
|
|
1386
1386
|
const fallback = catalogs.filter((c) => entry.owner === void 0 || c.owner === entry.owner);
|
|
1387
1387
|
if (fallback.length === 1) {
|
|
1388
|
-
const synthetic = { token: entry.target, kind: "class", lifetime: "singleton", implementation: entry.target, dependencies: [] };
|
|
1388
|
+
const synthetic = typeof entry.target === "function" ? { token: entry.target, kind: "class", lifetime: "singleton", implementation: entry.target, dependencies: [] } : { token: entry.target, kind: "value", lifetime: "singleton", implementation: entry.replacement, dependencies: [] };
|
|
1389
1389
|
candidates = [{ ...fallback[0], bindings: [...fallback[0].bindings, synthetic] }];
|
|
1390
1390
|
}
|
|
1391
1391
|
}
|