Skip to content

Commit

Permalink
add failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
BarryThePenguin committed Feb 20, 2024
1 parent 5b5a294 commit e31ed7d
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions packages/core/__tests__/config/load-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,39 @@ describe('Config: loadConfig', () => {
expect(config.environment.getConfiguredTemplateTags()).toEqual({ test: {} });
expect(config.checkStandaloneTemplates).toBe(false);
});

test('loads config with extends array', () => {
fs.writeFileSync(
`${testDir}/tsconfig-first.json`,
JSON.stringify({
glint: {
environment: 'first',
checkStandaloneTemplates: false,
},
})
);

fs.writeFileSync(
`${testDir}/tsconfig-second.json`,
JSON.stringify({
glint: {
environment: 'second',
checkStandaloneTemplates: false,
},
})
);

fs.writeFileSync(
`${testDir}/tsconfig.json`,
JSON.stringify({
extends: ['./tsconfig-first.json', './tsconfig-second.json'],
})
);

let config = loadConfig(testDir);

expect(config.rootDir).toBe(normalizePath(`${testDir}/deeply`));
expect(config.environment.getConfiguredTemplateTags()).toEqual({ test: {} });
expect(config.checkStandaloneTemplates).toBe(false);
});
});

0 comments on commit e31ed7d

Please sign in to comment.