Skip to content

Commit

Permalink
fix: Fix support for .mjs files
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbreiding committed Aug 24, 2020
1 parent 98874cc commit f1ecbaf
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/server/__snapshots__/3_plugins_spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exports['e2e plugins passes with working preprocessor 1'] = `
exports['e2e plugins preprocessor passes with working preprocessor 1'] = `
====================================================================================================
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@cypress/mocha-teamcity-reporter": "1.0.0",
"@cypress/request": "2.88.5",
"@cypress/request-promise": "4.2.6",
"@cypress/webpack-batteries-included-preprocessor": "2.0.1",
"@cypress/webpack-batteries-included-preprocessor": "2.1.1",
"@cypress/webpack-preprocessor": "5.4.4",
"@ffmpeg-installer/ffmpeg": "1.0.20",
"ansi_up": "4.0.4",
Expand Down
7 changes: 7 additions & 0 deletions packages/server/test/e2e/3_plugins_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,13 @@ describe('e2e plugins', function () {
spec: 'node_builtins_spec.js',
})
})

// https://github.com/cypress-io/cypress/issues/8361
it('supports .mjs files', function () {
return e2e.exec(this, {
spec: 'mjs_spec.mjs',
})
})
})

describe('projectRoot and configFile', function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const imFromMjs = 'I am from .mjs :)'
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { imFromMjs } from '../fixtures/mjs_file'

it('supports .mjs', () => {
expect(imFromMjs).to.equal('I am from .mjs :)')
})
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1934,10 +1934,10 @@
dependencies:
css.escape "^1.5.1"

"@cypress/webpack-batteries-included-preprocessor@2.0.1":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@cypress/webpack-batteries-included-preprocessor/-/webpack-batteries-included-preprocessor-2.0.1.tgz#1c3aa575ead5f3f2f5a1da149e57a9ed30895813"
integrity sha512-pBg80Yur3GivxBiVsm62UFBrTIz/SnoPl2l2ybOR+O3DcbJIuxKFUbCqyDZ3tFP6POE8d/Zb2NgZCeLWSKsOVQ==
"@cypress/webpack-batteries-included-preprocessor@2.1.1":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@cypress/webpack-batteries-included-preprocessor/-/webpack-batteries-included-preprocessor-2.1.1.tgz#4f914a25b2f3b619a1ee94418418c1635d75732f"
integrity sha512-2VOP1pyv8CNE5yGlebV4WnSffH4WymjZSUoww3Au8el2+xUY76uu1yr7Xpc2Tumey0JqI8lCikTYuNQ5GSf32A==
dependencies:
"@babel/core" "^7.11.1"
"@babel/plugin-proposal-class-properties" "^7.10.4"
Expand Down

0 comments on commit f1ecbaf

Please sign in to comment.