From c219e2c6c740bb157e2823a3644b2d0bab4a6478 Mon Sep 17 00:00:00 2001 From: Lachlan Miller Date: Fri, 2 Sep 2022 13:15:49 +1000 Subject: [PATCH] update tests with docker images and docker script --- .../scripts/bootstrap-docker-container.sh | 3 +++ system-tests/test-binary/node_versions_spec.ts | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/system-tests/scripts/bootstrap-docker-container.sh b/system-tests/scripts/bootstrap-docker-container.sh index cca161f9475d..9892cde6e3e4 100755 --- a/system-tests/scripts/bootstrap-docker-container.sh +++ b/system-tests/scripts/bootstrap-docker-container.sh @@ -36,6 +36,9 @@ export CYPRESS_CACHE_FOLDER=/tmp/CYPRESS_CACHE_FOLDER/ export npm_config_cache=/tmp/npm_config_cache/ export npm_config_package_lock=false +mkdir /tmp/npm_config_cache +chown -R 1000:1000 /tmp/npm_config_cache + npx npm@latest install --unsafe-perm --allow-root --force file:$CLI_PATH PATH=$PATH:./node_modules/.bin diff --git a/system-tests/test-binary/node_versions_spec.ts b/system-tests/test-binary/node_versions_spec.ts index d006b4b2730e..d62dd43db645 100644 --- a/system-tests/test-binary/node_versions_spec.ts +++ b/system-tests/test-binary/node_versions_spec.ts @@ -32,3 +32,20 @@ describe('binary node versions', () => { 'cypress/base:17.3.0', ].forEach(smokeTestDockerImage) }) + +describe('type: module', () => { + [ + 'cypress/base:16.17.0', + 'cypress/base:18.6.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, + }) + }) +})