@naturalcycles/dev-lib 12.14.0 → 12.14.1

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.
@@ -4,6 +4,7 @@
4
4
  */
5
5
 
6
6
  const fs = require('fs')
7
+ const { CI } = process.env
7
8
  const cwd = process.cwd()
8
9
 
9
10
  // Set 'setupFilesAfterEnv' only if it exists
@@ -21,20 +22,6 @@ module.exports = {
21
22
  testMatch: ['<rootDir>/src/**/*.integration.test.ts'],
22
23
  testPathIgnorePatterns: ['<rootDir>/.*/__exclude/'],
23
24
  setupFilesAfterEnv,
24
- coverageDirectory: 'tmp/coverage-integration',
25
- reporters: [
26
- 'default',
27
- [
28
- 'jest-junit',
29
- {
30
- suiteName: 'jest tests',
31
- outputDirectory: './tmp/jest',
32
- outputName: 'integration.xml',
33
- suiteNameTemplate: '{filepath}',
34
- classNameTemplate: '{classname}',
35
- titleTemplate: '{title}',
36
- ancestorSeparator: ' ',
37
- },
38
- ],
39
- ],
25
+ // integration tests don't do coverage
26
+ reporters: [],
40
27
  }
@@ -21,7 +21,6 @@ module.exports = {
21
21
  testMatch: ['<rootDir>/src/**/*.manual.test.ts'],
22
22
  testPathIgnorePatterns: ['<rootDir>/.*/__exclude/'],
23
23
  setupFilesAfterEnv,
24
- // Should never need coverage or reporters, but anyway
25
- coverageDirectory: 'tmp/coverage-manual',
26
- reporters: ['default'],
24
+ // Manual tests don't do coverage
25
+ reporters: [],
27
26
  }
@@ -67,8 +67,14 @@ async function runJest(opt = {}) {
67
67
  DEBUG_COLORS: '1',
68
68
  };
69
69
  if (CI) {
70
- args.push('--ci', '--coverage');
71
- maxWorkers || (maxWorkers = '--maxWorkers=2');
70
+ args.push('--ci');
71
+ if (!integration && !manual) {
72
+ // Coverage only makes sense for unit tests, not for integration/manual
73
+ args.push('--coverage');
74
+ }
75
+ // We used to default to 2, but due to memory being an issue for Jest - now we default to 1,
76
+ // as it's the most memory-efficient way
77
+ maxWorkers || (maxWorkers = '--maxWorkers=1');
72
78
  }
73
79
  // Running all tests - will use `--silent` to suppress console-logs, will also set process.env.JEST_SILENT=1
74
80
  if (CI || isRunningAllTests()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
- "version": "12.14.0",
3
+ "version": "12.14.1",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "tsn-debug": "tsn testScript.ts",