@tramvai/test-integration 2.51.1 → 2.56.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/lib/index.es.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import mergeDeep from '@tinkoff/utils/object/mergeDeep';
2
2
  import { Writable } from 'stream';
3
+ import envCi from 'env-ci';
3
4
  import { start } from '@tramvai/cli';
4
5
  import waitOn from 'wait-on';
5
6
  import { requestFactory, renderFactory } from '@tramvai/test-helpers';
@@ -60,6 +61,7 @@ const wrapMocker = ({ papi, }) => {
60
61
  };
61
62
  };
62
63
 
64
+ const ciInfo = envCi();
63
65
  const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = console, ...cliOptions } = {}) => {
64
66
  const stdout = new Writable({
65
67
  write(chunk, encoding, callback) {
@@ -78,6 +80,9 @@ const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = c
78
80
  stderr,
79
81
  noClientRebuild: !enableRebuild,
80
82
  noServerRebuild: !enableRebuild,
83
+ // build cache made tests unstable in CI, because of cache writing process are async,
84
+ // and there is no way to wait this process (`idleTimeoutForInitialStore: 0` helps sometimes, but no guarantees)
85
+ fileCache: !ciInfo.isCi,
81
86
  ...(typeof targetOrConfig === 'string'
82
87
  ? { target: targetOrConfig }
83
88
  : {
package/lib/index.js CHANGED
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var mergeDeep = require('@tinkoff/utils/object/mergeDeep');
6
6
  var stream = require('stream');
7
+ var envCi = require('env-ci');
7
8
  var cli = require('@tramvai/cli');
8
9
  var waitOn = require('wait-on');
9
10
  var testHelpers = require('@tramvai/test-helpers');
@@ -11,6 +12,7 @@ var testHelpers = require('@tramvai/test-helpers');
11
12
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
13
 
13
14
  var mergeDeep__default = /*#__PURE__*/_interopDefaultLegacy(mergeDeep);
15
+ var envCi__default = /*#__PURE__*/_interopDefaultLegacy(envCi);
14
16
  var waitOn__default = /*#__PURE__*/_interopDefaultLegacy(waitOn);
15
17
 
16
18
  const getServerUrl = ({ server }) => {
@@ -69,6 +71,7 @@ const wrapMocker = ({ papi, }) => {
69
71
  };
70
72
  };
71
73
 
74
+ const ciInfo = envCi__default["default"]();
72
75
  const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = console, ...cliOptions } = {}) => {
73
76
  const stdout = new stream.Writable({
74
77
  write(chunk, encoding, callback) {
@@ -87,6 +90,9 @@ const startCli = async (targetOrConfig, { enableRebuild = false, env, logger = c
87
90
  stderr,
88
91
  noClientRebuild: !enableRebuild,
89
92
  noServerRebuild: !enableRebuild,
93
+ // build cache made tests unstable in CI, because of cache writing process are async,
94
+ // and there is no way to wait this process (`idleTimeoutForInitialStore: 0` helps sometimes, but no guarantees)
95
+ fileCache: !ciInfo.isCi,
90
96
  ...(typeof targetOrConfig === 'string'
91
97
  ? { target: targetOrConfig }
92
98
  : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/test-integration",
3
- "version": "2.51.1",
3
+ "version": "2.56.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -22,13 +22,14 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@tinkoff/mocker": "2.1.2",
25
- "@tramvai/test-helpers": "2.51.1",
25
+ "@tramvai/test-helpers": "2.56.0",
26
+ "env-ci": "^5.0.2",
26
27
  "utility-types": "^3.10.0",
27
28
  "wait-on": "^5.3.0"
28
29
  },
29
30
  "peerDependencies": {
30
31
  "@tinkoff/utils": "^2.1.2",
31
- "@tramvai/cli": "2.51.1",
32
+ "@tramvai/cli": "2.56.0",
32
33
  "tslib": "^2.4.0"
33
34
  },
34
35
  "license": "Apache-2.0",