runspec-node 0.15.0 → 0.17.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.
@@ -26,34 +26,34 @@ quality = {default = 85, range = [1, 100], env = "CI_QUALITY"}
26
26
 
27
27
  describe('env resolution', () => {
28
28
  afterEach(() => {
29
- delete process.env['RUNSPEC_ARG_QUALITY'];
29
+ delete process.env['RUNSPEC_COMPRESS_ARG_QUALITY'];
30
30
  delete process.env['CI_QUALITY'];
31
31
  });
32
32
 
33
- test('RUNSPEC_ARG_* provides auto default when no CLI arg', () => {
33
+ test('RUNSPEC_<RUNNABLE>_ARG_* provides auto default when no CLI arg', () => {
34
34
  const configPath = makeTmpConfig(QUALITY_TOML);
35
- process.env['RUNSPEC_ARG_QUALITY'] = '95';
35
+ process.env['RUNSPEC_COMPRESS_ARG_QUALITY'] = '95';
36
36
  const args = parse({ scriptName: 'compress', argv: [], configPath });
37
37
  expect(args['quality']).toBe(95);
38
38
  });
39
39
 
40
- test('CLI arg wins over RUNSPEC_ARG_*', () => {
40
+ test('CLI arg wins over RUNSPEC_<RUNNABLE>_ARG_*', () => {
41
41
  const configPath = makeTmpConfig(QUALITY_TOML);
42
- process.env['RUNSPEC_ARG_QUALITY'] = '95';
42
+ process.env['RUNSPEC_COMPRESS_ARG_QUALITY'] = '95';
43
43
  const args = parse({ scriptName: 'compress', argv: ['--quality', '80'], configPath });
44
44
  expect(args['quality']).toBe(80);
45
45
  });
46
46
 
47
- test('developer alias fallback when RUNSPEC_ARG_* not set', () => {
47
+ test('developer alias fallback when RUNSPEC_<RUNNABLE>_ARG_* not set', () => {
48
48
  const configPath = makeTmpConfig(QUALITY_ALIAS_TOML);
49
49
  process.env['CI_QUALITY'] = '70';
50
50
  const args = parse({ scriptName: 'compress', argv: [], configPath });
51
51
  expect(args['quality']).toBe(70);
52
52
  });
53
53
 
54
- test('RUNSPEC_ARG_* wins over developer alias', () => {
54
+ test('RUNSPEC_<RUNNABLE>_ARG_* wins over developer alias', () => {
55
55
  const configPath = makeTmpConfig(QUALITY_ALIAS_TOML);
56
- process.env['RUNSPEC_ARG_QUALITY'] = '95';
56
+ process.env['RUNSPEC_COMPRESS_ARG_QUALITY'] = '95';
57
57
  process.env['CI_QUALITY'] = '70';
58
58
  const args = parse({ scriptName: 'compress', argv: [], configPath });
59
59
  expect(args['quality']).toBe(95);
@@ -42,7 +42,7 @@ function captureStderr() {
42
42
 
43
43
  beforeEach(() => {
44
44
  _resetForTest();
45
- delete process.env['RUNSPEC_ARG_NO_SUMMARY'];
45
+ delete process.env['RUNSPEC_MYSCRIPT_ARG_NO_SUMMARY'];
46
46
  });
47
47
 
48
48
  afterAll(() => {
@@ -168,8 +168,8 @@ test('summary=false in config disables summary', () => {
168
168
  expect(cap.lines.join('')).not.toContain('runspec: ');
169
169
  });
170
170
 
171
- test('RUNSPEC_ARG_NO_SUMMARY=1 disables summary', () => {
172
- process.env['RUNSPEC_ARG_NO_SUMMARY'] = '1';
171
+ test('RUNSPEC_MYSCRIPT_ARG_NO_SUMMARY=1 disables summary', () => {
172
+ process.env['RUNSPEC_MYSCRIPT_ARG_NO_SUMMARY'] = '1';
173
173
  const dir = tmpDir();
174
174
  configureLogging(makeCfg(dir));
175
175
  const cap = captureStderr();