@vendure/testing 2.0.0-next.16 → 2.0.0-next.18
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.
|
@@ -11,6 +11,16 @@ export declare const E2E_DEFAULT_CHANNEL_TOKEN = "e2e-default-channel";
|
|
|
11
11
|
* * `assetStorageStrategy: new TestingAssetStorageStrategy()` This strategy does not actually persist any binary data to disk.
|
|
12
12
|
* * `assetPreviewStrategy: new TestingAssetPreviewStrategy()` This strategy is a no-op.
|
|
13
13
|
*
|
|
14
|
+
* ## Logging
|
|
15
|
+
* By default, the testConfig does not output any log messages. This is most desirable to keep a clean CI output.
|
|
16
|
+
* However, for debugging purposes, it can make it hard to figure out why tests fail.
|
|
17
|
+
*
|
|
18
|
+
* You can enable default logging behaviour with the environment variable `LOG`:
|
|
19
|
+
*
|
|
20
|
+
* ```
|
|
21
|
+
* LOG=true yarn e2e
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
14
24
|
* @docsCategory testing
|
|
15
25
|
*/
|
|
16
26
|
export declare const testConfig: Required<VendureConfig>;
|
|
@@ -7,6 +7,7 @@ const testing_asset_preview_strategy_1 = require("./testing-asset-preview-strate
|
|
|
7
7
|
const testing_asset_storage_strategy_1 = require("./testing-asset-storage-strategy");
|
|
8
8
|
const testing_entity_id_strategy_1 = require("./testing-entity-id-strategy");
|
|
9
9
|
exports.E2E_DEFAULT_CHANNEL_TOKEN = 'e2e-default-channel';
|
|
10
|
+
const logger = process.env.LOG ? new core_1.DefaultLogger() : new core_1.NoopLogger();
|
|
10
11
|
/**
|
|
11
12
|
* @description
|
|
12
13
|
* A {@link VendureConfig} object used for e2e tests. This configuration uses sqljs as the database
|
|
@@ -18,6 +19,16 @@ exports.E2E_DEFAULT_CHANNEL_TOKEN = 'e2e-default-channel';
|
|
|
18
19
|
* * `assetStorageStrategy: new TestingAssetStorageStrategy()` This strategy does not actually persist any binary data to disk.
|
|
19
20
|
* * `assetPreviewStrategy: new TestingAssetPreviewStrategy()` This strategy is a no-op.
|
|
20
21
|
*
|
|
22
|
+
* ## Logging
|
|
23
|
+
* By default, the testConfig does not output any log messages. This is most desirable to keep a clean CI output.
|
|
24
|
+
* However, for debugging purposes, it can make it hard to figure out why tests fail.
|
|
25
|
+
*
|
|
26
|
+
* You can enable default logging behaviour with the environment variable `LOG`:
|
|
27
|
+
*
|
|
28
|
+
* ```
|
|
29
|
+
* LOG=true yarn e2e
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
21
32
|
* @docsCategory testing
|
|
22
33
|
*/
|
|
23
34
|
exports.testConfig = (0, core_1.mergeConfig)(core_1.defaultConfig, {
|
|
@@ -48,7 +59,7 @@ exports.testConfig = (0, core_1.mergeConfig)(core_1.defaultConfig, {
|
|
|
48
59
|
paymentOptions: {
|
|
49
60
|
paymentMethodHandlers: [],
|
|
50
61
|
},
|
|
51
|
-
logger
|
|
62
|
+
logger,
|
|
52
63
|
importExportOptions: {},
|
|
53
64
|
assetOptions: {
|
|
54
65
|
assetNamingStrategy: new core_1.DefaultAssetNamingStrategy(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-config.js","sourceRoot":"","sources":["../../src/config/test-config.ts"],"names":[],"mappings":";;;AAAA,2EAAqF;AACrF,
|
|
1
|
+
{"version":3,"file":"test-config.js","sourceRoot":"","sources":["../../src/config/test-config.ts"],"names":[],"mappings":";;;AAAA,2EAAqF;AACrF,wCAOuB;AAEvB,qFAA+E;AAC/E,qFAA+E;AAC/E,6EAAuE;AAE1D,QAAA,yBAAyB,GAAG,qBAAqB,CAAC;AAE/D,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,oBAAa,EAAE,CAAC,CAAC,CAAC,IAAI,iBAAU,EAAE,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACU,QAAA,UAAU,GAA4B,IAAA,kBAAW,EAAC,oBAAa,EAAE;IAC1E,UAAU,EAAE;QACR,IAAI,EAAE,IAAI;QACV,YAAY,EAAE,iCAAc;QAC5B,WAAW,EAAE,gCAAa;QAC1B,IAAI,EAAE,IAAI;KACb;IACD,mBAAmB,EAAE,iCAAyB;IAC9C,WAAW,EAAE;QACT,WAAW,EAAE,QAAQ;QACrB,mBAAmB,EAAE,IAAI;QACzB,aAAa,EAAE;YACX,MAAM,EAAE,aAAa;SACxB;KACJ;IACD,mBAAmB,EAAE;QACjB,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,IAAI,UAAU,CAAC,EAAE,CAAC;QAC5B,QAAQ,EAAE,EAAE;QACZ,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;KACjB;IACD,gBAAgB,EAAE,EAAE;IACpB,YAAY,EAAE,EAAE;IAChB,aAAa,EAAE,EAAE,gBAAgB,EAAE,IAAI,oDAAuB,EAAE,EAAE;IAClE,cAAc,EAAE;QACZ,qBAAqB,EAAE,EAAE;KAC5B;IACD,MAAM;IACN,mBAAmB,EAAE,EAAE;IACvB,YAAY,EAAE;QACV,mBAAmB,EAAE,IAAI,iCAA0B,EAAE;QACrD,oBAAoB,EAAE,IAAI,4DAA2B,EAAE;QACvD,oBAAoB,EAAE,IAAI,4DAA2B,EAAE;KAC1D;CACJ,CAAC,CAAC"}
|
package/lib/testing-logger.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { VendureLogger } from '@vendure/core';
|
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* The TestingLogger can be used in unit tests or e2e tests to make assertions on whether the various
|
|
5
|
-
* Logger methods have been called, and which
|
|
5
|
+
* Logger methods have been called, and which arguments.
|
|
6
6
|
*
|
|
7
7
|
* Here's some examples of how to use it in e2e tests and unit tests. In both cases we are using
|
|
8
8
|
* the Jest testing framework, but the TestingLogger should work with other similar frameworks
|
package/lib/testing-logger.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.TestingLogger = void 0;
|
|
|
4
4
|
/**
|
|
5
5
|
* @description
|
|
6
6
|
* The TestingLogger can be used in unit tests or e2e tests to make assertions on whether the various
|
|
7
|
-
* Logger methods have been called, and which
|
|
7
|
+
* Logger methods have been called, and which arguments.
|
|
8
8
|
*
|
|
9
9
|
* Here's some examples of how to use it in e2e tests and unit tests. In both cases we are using
|
|
10
10
|
* the Jest testing framework, but the TestingLogger should work with other similar frameworks
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vendure/testing",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.18",
|
|
4
4
|
"description": "End-to-end testing tools for Vendure projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vendure",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@types/node-fetch": "^2.5.4",
|
|
37
|
-
"@vendure/common": "^2.0.0-next.
|
|
37
|
+
"@vendure/common": "^2.0.0-next.18",
|
|
38
38
|
"faker": "^4.1.0",
|
|
39
39
|
"form-data": "^3.0.0",
|
|
40
40
|
"graphql": "16.3.0",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/mysql": "^2.15.15",
|
|
47
47
|
"@types/pg": "^7.14.5",
|
|
48
|
-
"@vendure/core": "^2.0.0-next.
|
|
48
|
+
"@vendure/core": "^2.0.0-next.18",
|
|
49
49
|
"mysql": "^2.18.1",
|
|
50
50
|
"pg": "^8.4.0",
|
|
51
51
|
"rimraf": "^3.0.0",
|
|
52
52
|
"typescript": "4.5.5"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "d42d6418c7f0031ebcb378599601d97ae3067f81"
|
|
55
55
|
}
|