Files
cypress/system-tests/test-binary/node_versions_spec.ts
Bill Glesias 5a6b8c49cf fix: Typescript config invalid with node v22.7.0 with ESM (#30099)
* add failing system binary test [run ci]

* fix: leverage the --no-experimental-detect-module when node 22.7.0 and above is detected [run ci]

* Update cli/CHANGELOG.md

* use environment variable to mock stubbing out of typescript install in order to unit test as mocking the module seems near impossible to do correctly given the context [run ci]

* update changelog to include mention of experimental-detect-module

* make sure node version is set before comparing versions

* Revert "update changelog to include mention of experimental-detect-module"

This reverts commit 5ef8ef0e4c.

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-08-27 09:03:41 -04:00

54 lines
1.2 KiB
TypeScript

import systemTests from '../lib/system-tests'
function smokeTestDockerImage (dockerImage: string) {
context('e2e', () => {
systemTests.it(`can run in ${dockerImage}`, {
withBinary: true,
browser: 'electron',
dockerImage,
spec: 'test1.js',
specDir: 'tests',
project: 'todos',
})
})
context('component', () => {
systemTests.it(`can run in ${dockerImage}`, {
withBinary: true,
browser: 'electron',
dockerImage,
testingType: 'component',
project: 'simple-ct',
spec: 'src/simple_passing_component.cy.js',
})
})
}
describe('binary node versions', () => {
[
'cypress/base:18.16.1',
'cypress/base:20.12.2',
'cypress/base:22.0.0',
'cypress/base:22.7.0',
].forEach(smokeTestDockerImage)
})
describe('type: module', () => {
[
'cypress/base:18.16.1',
'cypress/base:20.12.2',
'cypress/base:22.0.0',
'cypress/base:22.7.0',
].forEach((dockerImage) => {
systemTests.it(`can run in ${dockerImage}`, {
withBinary: true,
project: 'config-cjs-and-esm/config-with-ts-module',
dockerImage,
testingType: 'e2e',
spec: 'app.cy.js',
browser: 'electron',
expectedExitCode: 0,
})
})
})