Skip to content

Commit 7b97a6f

Browse files
author
Kent C. Dodds
committed
fix: set configFile to false by default
1 parent 395feb3 commit 7b97a6f

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ pluginTester({
339339
parserOpts: {},
340340
generatorOpts: {},
341341
babelrc: false,
342+
configFile: false,
342343
},
343344
snapshot: false, // use jest snapshots (only works with jest)
344345

src/__mocks__/@babel/core.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
import * as babel from '@babel/core'
22

3+
// doing things this way so we can spyOn babel APIs
4+
// and without this we were getting errors:
5+
// TypeError: Cannot set property transform of #<Object> which has only a getter
36
module.exports = {...babel}

src/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const fullDefaultConfig = {
2424
parserOpts: {},
2525
generatorOpts: {},
2626
babelrc: false,
27+
configFile: false,
2728
},
2829
}
2930

@@ -303,9 +304,11 @@ const createFixtureTests = (fixturesDir, options) => {
303304
...rest
304305
} = options
305306

306-
const hasBabelrc = ['.babelrc', '.babelrc.js', '.babelrc.cjs'].some(
307-
babelrc => fs.existsSync(path.join(fixtureDir, babelrc)),
308-
)
307+
const hasBabelrc = [
308+
'.babelrc',
309+
'.babelrc.js',
310+
'.babelrc.cjs',
311+
].some(babelrc => fs.existsSync(path.join(fixtureDir, babelrc)))
309312

310313
const {babelOptions} = mergeWith(
311314
{},

0 commit comments

Comments
 (0)