@fougere/testing 0.11.0-alpha.0 → 0.12.0-alpha.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/dist/app/TestApp.d.ts.map +1 -1
- package/dist/app/TestApp.js +4 -3
- package/dist/app/TestApp.js.map +1 -1
- package/package.json +14 -14
- package/src/app/TestApp.ts +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestApp.d.ts","sourceRoot":"","sources":["../../src/app/TestApp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"TestApp.d.ts","sourceRoot":"","sources":["../../src/app/TestApp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,eAAe,CAAC;AAGzC,OAAO,EAAgB,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAI1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,0FAA0F;AAC1F,MAAM,WAAW,OAAQ,SAAQ,GAAG;IAClC,kFAAkF;IAClF,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAC7D,wDAAwD;IACxD,SAAS,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,GAAG,OAAO,EAAE,CAAC;CACvD;AAED,8DAA8D;AAC9D,wBAAsB,OAAO,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,CA2C5E"}
|
package/dist/app/TestApp.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { boot } from '@fougere/compiler';
|
|
2
|
-
import { createContainer } from '@fougere/container';
|
|
3
2
|
import { resolveStorage } from '@fougere/defaults';
|
|
4
3
|
import { installStubs } from '../stub/Stub.js';
|
|
5
4
|
import { scopeOfRun } from '../scope.js';
|
|
@@ -17,11 +16,13 @@ export async function testApp(options = {}) {
|
|
|
17
16
|
const app = await boot({
|
|
18
17
|
onEmit: (fact, payload) => { heard.push({ fact, payload }); },
|
|
19
18
|
root: options.root ?? scope?.root,
|
|
20
|
-
createContainer,
|
|
21
19
|
fronds: options.fronds ?? (scope?.frond ? [scope.frond] : undefined),
|
|
22
20
|
// `boot` merges this over the file, so a project declaring a real database still
|
|
23
21
|
// gets the in-memory one here.
|
|
24
|
-
|
|
22
|
+
// `boot` merges this over the file: an empty tree states no address, so nothing is
|
|
23
|
+
// placed elsewhere and a test runs what it declares.
|
|
24
|
+
config: options.topology ? undefined : { fronds: {} },
|
|
25
|
+
...(options.topology ? {} : { remotes: {} }),
|
|
25
26
|
db: () => resolveStorage(db),
|
|
26
27
|
});
|
|
27
28
|
const doubles = installStubs(app, options.stub ?? []);
|
package/dist/app/TestApp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestApp.js","sourceRoot":"","sources":["../../src/app/TestApp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TestApp.js","sourceRoot":"","sources":["../../src/app/TestApp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAiB,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAa,MAAM,iBAAiB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAW7C,8DAA8D;AAC9D,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,OAAO,GAAmB,EAAE;IACxD,MAAM,EAAE,GAAa,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AAC,MAAM,CAAC,GAAG,EAAE;QACxB,SAAS,CAAC,IAA+B;YACvC,mFAAmF;YACnF,8EAA8E;YAC9E,2EAA2E;YAC3E,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACvE,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC1F,CAAC;QACD,IAAI,CAAI,IAA0C;YAChD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,IAAY,CAAC,CAAC;YACxC,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,MAAM,IAAI,KAAK,CACb,UAAW,IAAa,CAAC,IAAI,gDAAiD,IAAa,CAAC,IAAI,OAAO,CACxG,CAAC;YACJ,CAAC;YACD,OAAO,KAAgB,CAAC;QAC1B,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,kEAAkE;AAClE,SAAS,eAAe;IACtB,MAAM,OAAO,GAAG,UAA2D,CAAC;IAC5E,OAAO,OAAO,CAAC,iBAAiB,EAAE,QAAQ,CAAC;AAC7C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fougere/testing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0-alpha.0",
|
|
4
4
|
"description": "Tests derived from the declaration — cases, stubs and a gradient of realities.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fougere",
|
|
@@ -34,22 +34,22 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"json-schema-faker": "^0.6.3",
|
|
37
|
-
"@fougere/
|
|
38
|
-
"@fougere/
|
|
39
|
-
"@fougere/schema": "0.
|
|
40
|
-
"@fougere/
|
|
41
|
-
"@fougere/
|
|
42
|
-
"@fougere/
|
|
43
|
-
"@fougere/compiler": "0.
|
|
37
|
+
"@fougere/container": "0.12.0-alpha.0",
|
|
38
|
+
"@fougere/app": "0.12.0-alpha.0",
|
|
39
|
+
"@fougere/schema": "0.12.0-alpha.0",
|
|
40
|
+
"@fougere/core": "0.12.0-alpha.0",
|
|
41
|
+
"@fougere/defaults": "0.12.0-alpha.0",
|
|
42
|
+
"@fougere/transport-http": "0.12.0-alpha.0",
|
|
43
|
+
"@fougere/compiler": "0.12.0-alpha.0"
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"vitest": ">=2",
|
|
50
|
-
"@fougere/adapter-graphql": "0.
|
|
51
|
-
"@fougere/
|
|
52
|
-
"@fougere/
|
|
50
|
+
"@fougere/adapter-graphql": "^0.12.0-alpha.0",
|
|
51
|
+
"@fougere/adapter-sql": "^0.12.0-alpha.0",
|
|
52
|
+
"@fougere/observability": "^0.12.0-alpha.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"vitest": {
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"vitest": "^4.1.0",
|
|
70
|
-
"@fougere/adapter-graphql": "0.
|
|
71
|
-
"@fougere/adapter-sql": "0.
|
|
72
|
-
"@fougere/observability": "0.
|
|
70
|
+
"@fougere/adapter-graphql": "0.12.0-alpha.0",
|
|
71
|
+
"@fougere/adapter-sql": "0.12.0-alpha.0",
|
|
72
|
+
"@fougere/observability": "0.12.0-alpha.0"
|
|
73
73
|
},
|
|
74
74
|
"scripts": {
|
|
75
75
|
"build": "rm -rf dist && tsc",
|
package/src/app/TestApp.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type App } from '@fougere/core';
|
|
2
2
|
import { boot } from '@fougere/compiler';
|
|
3
|
-
import { createContainer } from '@fougere/container';
|
|
4
3
|
import { resolveStorage, type DbConfig } from '@fougere/defaults';
|
|
5
4
|
import { installStubs, type Stub } from '../stub/Stub.js';
|
|
6
5
|
import type { Port } from '../stub/Port.js';
|
|
@@ -31,11 +30,13 @@ export async function testApp(options: TestAppOptions = {}): Promise<TestApp> {
|
|
|
31
30
|
const app = await boot({
|
|
32
31
|
onEmit: (fact, payload) => { heard.push({ fact, payload }); },
|
|
33
32
|
root: options.root ?? scope?.root,
|
|
34
|
-
createContainer,
|
|
35
33
|
fronds: options.fronds ?? (scope?.frond ? [scope.frond] : undefined),
|
|
36
34
|
// `boot` merges this over the file, so a project declaring a real database still
|
|
37
35
|
// gets the in-memory one here.
|
|
38
|
-
|
|
36
|
+
// `boot` merges this over the file: an empty tree states no address, so nothing is
|
|
37
|
+
// placed elsewhere and a test runs what it declares.
|
|
38
|
+
config: options.topology ? undefined : { fronds: {} },
|
|
39
|
+
...(options.topology ? {} : { remotes: {} }),
|
|
39
40
|
db: () => resolveStorage(db),
|
|
40
41
|
});
|
|
41
42
|
|