Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Remove esModuleInterop default from ts-node (#7808)
* Remove esModuleInterop from ts-node. * Add e2e test. * Fix test. Change test name. Add comment. * Fix test snapshot name. * update snapshotting Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>
- Loading branch information
1 parent
8d95773
commit 55e97a1
Showing
10 changed files
with
50 additions
and
261 deletions.
There are no files selected for viewing
259 changes: 0 additions & 259 deletions
259
packages/server/__snapshots__/1_typescript_support_spec.ts.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/server/test/support/fixtures/projects/ts-proj-esmoduleinterop-false/cypress.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
3 changes: 3 additions & 0 deletions
3
...t/support/fixtures/projects/ts-proj-esmoduleinterop-false/cypress/integration/app_spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
it('dummy', () => { | ||
expect(1 + 1).to.eq(2) | ||
}) |
1 change: 1 addition & 0 deletions
1
...erver/test/support/fixtures/projects/ts-proj-esmoduleinterop-false/cypress/plugins/add.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = (a, b) => a + b |
13 changes: 13 additions & 0 deletions
13
...ver/test/support/fixtures/projects/ts-proj-esmoduleinterop-false/cypress/plugins/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/// <reference types="cypress" /> | ||
|
||
// https://github.com/cypress-io/cypress/issues/7575 | ||
// It is tested here because Cypress spec files and support/plugin files use different TypeScript settings. | ||
// And we want to test if esModuleInterop can be overriden in support/plugin files. | ||
import * as add from './add' | ||
|
||
add(1, 2) | ||
|
||
// Default Cypress plugin function | ||
export default (on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions) => { | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
...ver/test/support/fixtures/projects/ts-proj-esmoduleinterop-false/cypress/support/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// *********************************************************** | ||
// This example support/index.js is processed and | ||
// loaded automatically before your test files. | ||
// | ||
// This is a great place to put global configuration and | ||
// behavior that modifies Cypress. | ||
// | ||
// You can change the location of this file or turn off | ||
// automatically serving support files with the | ||
// 'supportFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/configuration | ||
// *********************************************************** | ||
|
||
// Import commands.js using ES2015 syntax: | ||
// import './commands' | ||
|
||
// Alternatively you can use CommonJS syntax: | ||
// require('./commands') |
5 changes: 5 additions & 0 deletions
5
packages/server/test/support/fixtures/projects/ts-proj-esmoduleinterop-false/tsconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"compilerOptions": { | ||
"esModuleInterop": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters