Skip to content

Commit 32ba646

Browse files
committed
chore: removes v1 compat tests
1 parent bde97c1 commit 32ba646

File tree

1 file changed

+0
-148
lines changed

1 file changed

+0
-148
lines changed

app-config-config/src/index.test.ts

Lines changed: 0 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -313,154 +313,6 @@ describe('CI Environment Variable Extension', () => {
313313
});
314314
});
315315

316-
describe('V1 Compatibility', () => {
317-
it('retains nested properties called app-config', async () => {
318-
await withTempFiles(
319-
{
320-
'.app-config.yml': `
321-
nested:
322-
app-config:
323-
extends: base-file.yml
324-
`,
325-
},
326-
async (inDir) => {
327-
const { fullConfig } = await loadUnvalidatedConfig({ directory: inDir('.') });
328-
329-
// keeps config intact, since app-config isn't at the root
330-
expect(fullConfig).toEqual({ nested: { 'app-config': { extends: 'base-file.yml' } } });
331-
},
332-
);
333-
});
334-
335-
it('uses special app-config property for $extends', async () => {
336-
await withTempFiles(
337-
{
338-
'.app-config.yml': `
339-
app-config: { extends: "base-file.yml" }
340-
foo: 88
341-
`,
342-
'base-file.yml': `
343-
foo: 42
344-
bar: foo
345-
`,
346-
},
347-
async (inDir) => {
348-
const { fullConfig } = await loadUnvalidatedConfig({ directory: inDir('.') });
349-
350-
expect(fullConfig).toEqual({ foo: 88, bar: 'foo' });
351-
},
352-
);
353-
});
354-
355-
it('uses special app-config property for $extendsOptional', async () => {
356-
await withTempFiles(
357-
{
358-
'.app-config.yml': `
359-
app-config: { extendsOptional: "base-file.yml" }
360-
foo: 88
361-
`,
362-
'base-file.yml': `
363-
foo: 42
364-
bar: foo
365-
`,
366-
},
367-
async (inDir) => {
368-
const { fullConfig } = await loadUnvalidatedConfig({ directory: inDir('.') });
369-
370-
expect(fullConfig).toEqual({ foo: 88, bar: 'foo' });
371-
},
372-
);
373-
374-
await withTempFiles(
375-
{
376-
'.app-config.yml': `
377-
app-config: { extendsOptional: "base-file.yml" }
378-
foo: 88
379-
`,
380-
},
381-
async (inDir) => {
382-
const { fullConfig } = await loadUnvalidatedConfig({ directory: inDir('.') });
383-
384-
expect(fullConfig).toEqual({ foo: 88 });
385-
},
386-
);
387-
});
388-
389-
it('uses special app-config property for $override', async () => {
390-
await withTempFiles(
391-
{
392-
'.app-config.yml': `
393-
app-config: { override: "base-file.yml" }
394-
foo: 88
395-
`,
396-
'base-file.yml': `
397-
foo: 42
398-
bar: foo
399-
`,
400-
},
401-
async (inDir) => {
402-
const { fullConfig } = await loadUnvalidatedConfig({ directory: inDir('.') });
403-
404-
expect(fullConfig).toEqual({ foo: 42, bar: 'foo' });
405-
},
406-
);
407-
});
408-
409-
it('uses special app-config property for $overrideOptional', async () => {
410-
await withTempFiles(
411-
{
412-
'.app-config.yml': `
413-
app-config: { overrideOptional: "base-file.yml" }
414-
foo: 88
415-
`,
416-
'base-file.yml': `
417-
foo: 42
418-
bar: foo
419-
`,
420-
},
421-
async (inDir) => {
422-
const { fullConfig } = await loadUnvalidatedConfig({ directory: inDir('.') });
423-
424-
expect(fullConfig).toEqual({ foo: 42, bar: 'foo' });
425-
},
426-
);
427-
428-
await withTempFiles(
429-
{
430-
'.app-config.yml': `
431-
app-config: { overrideOptional: "base-file.yml" }
432-
foo: 88
433-
`,
434-
},
435-
async (inDir) => {
436-
const { fullConfig } = await loadUnvalidatedConfig({ directory: inDir('.') });
437-
438-
expect(fullConfig).toEqual({ foo: 88 });
439-
},
440-
);
441-
});
442-
443-
it('uses an ambiguous path in special app-config property', async () => {
444-
await withTempFiles(
445-
{
446-
'.app-config.yml': `
447-
app-config: { extends: "base-file" }
448-
foo: 88
449-
`,
450-
'base-file.yml': `
451-
foo: 42
452-
bar: foo
453-
`,
454-
},
455-
async (inDir) => {
456-
const { fullConfig } = await loadUnvalidatedConfig({ directory: inDir('.') });
457-
458-
expect(fullConfig).toEqual({ foo: 88, bar: 'foo' });
459-
},
460-
);
461-
});
462-
});
463-
464316
describe('Special values', () => {
465317
it('fails to loadUnvalidatedConfig when a $ prefixed key is seen', async () => {
466318
process.env.APP_CONFIG = JSON.stringify({ a: { b: { $c: true } } });

0 commit comments

Comments
 (0)