Skip to content

Commit a1d3618

Browse files
committed
remove auto cjs behaviour
1 parent ef1e753 commit a1d3618

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/run/paths.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ async function deriveSupportPaths(
129129
) {
130130
const defaultPaths = getFeatureDirectoryPaths(cwd, featurePaths)
131131
const requirePaths = await expandPaths(cwd, defaultPaths, '.js')
132-
const importPaths = await expandPaths(cwd, defaultPaths, '.@(cjs|mjs)')
132+
const importPaths = await expandPaths(cwd, defaultPaths, '.@(mjs)')
133133
return { requirePaths, importPaths }
134134
}
135135
const requirePaths =

src/run/paths_spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ describe('resolvePaths', () => {
2424
await fsExtra.outputFile(featurePath, '')
2525
const jsSupportCodePath = path.join(cwd, 'features', 'a.js')
2626
await fsExtra.outputFile(jsSupportCodePath, '')
27-
const cjsSupportCodePath = path.join(cwd, 'features', 'a.cjs')
28-
await fsExtra.outputFile(cjsSupportCodePath, '')
2927
const esmSupportCodePath = path.join(cwd, 'features', 'a.mjs')
3028
await fsExtra.outputFile(esmSupportCodePath, '')
3129

@@ -50,7 +48,7 @@ describe('resolvePaths', () => {
5048
expect(featurePaths).to.eql([featurePath])
5149
expect(unexpandedFeaturePaths).to.eql([relativeFeaturePath])
5250
expect(requirePaths).to.eql([jsSupportCodePath])
53-
expect(importPaths).to.eql([cjsSupportCodePath, esmSupportCodePath])
51+
expect(importPaths).to.eql([esmSupportCodePath])
5452
})
5553

5654
it('deduplicates the .feature files before returning', async function () {

0 commit comments

Comments
 (0)