Skip to content

Commit 37baca3

Browse files
committed
Add unit test
1 parent ab57bdc commit 37baca3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/config/parse-runtime.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,18 @@ describe('parse-runtime', () => {
108108
expect(config.babelRcFileExists).to.be.true;
109109
});
110110

111+
it('babel.config.json detected when present', () => {
112+
const projectDir = createTestDirectory();
113+
fs.writeFileSync(
114+
path.join(projectDir, 'babel.config.json'),
115+
'{}'
116+
);
117+
118+
const config = parseArgv(createArgv(['dev']), projectDir);
119+
120+
expect(config.babelRcFileExists).to.be.true;
121+
});
122+
111123
it('dev-server command hot', () => {
112124
const testDir = createTestDirectory();
113125
const config = parseArgv(createArgv(['dev-server', '--hot']), testDir);

0 commit comments

Comments
 (0)