sxy-test-runner 1.0.11 → 1.0.13

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.
@@ -1,24 +0,0 @@
1
- export async function shouldCaptureConsoleLog(config, context) {
2
- switch (context) {
3
- case 'file':
4
- {
5
- return config.execution.files === 'sequential';
6
- }
7
-
8
- case 'describe':
9
- {
10
- return config.execution.files === 'sequential' && config.execution.describes === 'sequential';
11
- }
12
-
13
- case 'test':
14
- {
15
- return config.execution.files === 'sequential' && config.execution.describes === 'sequential' && config.execution.tests === 'sequential';
16
- }
17
-
18
- default:
19
- {
20
- // not bothering with package name because this should never occur in prod
21
- throw new Error(`shouldCaptureConsoleLog() error, unknown context ${context}`);
22
- }
23
- }
24
- }
@@ -1,31 +0,0 @@
1
- //import { defaultConfig } from './defaultConfig.js'
2
- import { applyConfigDefaults } from './applyConfigDefaults.js';
3
- import { shouldCaptureConsoleLog } from './shouldCaptureConsoleLog.js';
4
- await mochaDescribe('shouldCaptureConsoleLog() function', async function () {
5
- await mochaIt('should return false when files are parallel', async function () {
6
- const partConfig = {
7
- execution: {
8
- files: 'parallel',
9
- describes: 'sequential',
10
- tests: 'sequential'
11
- }
12
- };
13
- const config = await applyConfigDefaults(partConfig);
14
- (await shouldCaptureConsoleLog(config, 'file')).should.be.false;
15
- (await shouldCaptureConsoleLog(config, 'describe')).should.be.false;
16
- (await shouldCaptureConsoleLog(config, 'test')).should.be.false;
17
- });
18
- await mochaIt('should return true for all when all are sequential', async function () {
19
- const partConfig = {
20
- execution: {
21
- files: 'sequential',
22
- describes: 'sequential',
23
- tests: 'sequential'
24
- }
25
- };
26
- const config = await applyConfigDefaults(partConfig);
27
- (await shouldCaptureConsoleLog(config, 'file')).should.be.true;
28
- (await shouldCaptureConsoleLog(config, 'describe')).should.be.true;
29
- (await shouldCaptureConsoleLog(config, 'test')).should.be.true;
30
- });
31
- });
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- "globals": {
3
- "describe": "readonly",
4
- "test": "readonly",
5
- "it": "readonly"
6
- }
7
- };