Skip to content

Commit

Permalink
ensure that snapshot is only used on e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthemanuel committed Nov 17, 2022
1 parent 65580d9 commit 6684f14
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
9 changes: 9 additions & 0 deletions packages/frontend-shared/cypress/e2e/e2ePluginSetup.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
if (require.name !== 'customRequire') {
// Purposefully make this a dynamic require so that it doesn't have the potential to get picked up by snapshotting mechanism
const hook = '@packages/server/hook'

const { hookRequire } = require(`${hook}-require`)

hookRequire(false)
}

import path from 'path'
import execa from 'execa'

Expand Down
9 changes: 0 additions & 9 deletions packages/server/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
const runChildProcess = async (entryPoint) => {
require('./lib/plugins/child/register_ts_node')
if (require.name !== 'customRequire') {
// Purposefully make this a dynamic require so that it doesn't have the potential to get picked up by snapshotting mechanism
const hook = './hook'

const { hookRequire } = require(`${hook}-require`)

hookRequire(false)
}

require(entryPoint)
}

Expand Down

5 comments on commit 6684f14

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6684f14 Nov 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/11.2.0/linux-arm64/ryanm/fix/cy-in-cy-and-v8-snapshots-6684f14b6d5af6c467330423555ad1e2a44fe82e/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6684f14 Nov 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/11.2.0/linux-x64/ryanm/fix/cy-in-cy-and-v8-snapshots-6684f14b6d5af6c467330423555ad1e2a44fe82e/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6684f14 Nov 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/11.2.0/darwin-x64/ryanm/fix/cy-in-cy-and-v8-snapshots-6684f14b6d5af6c467330423555ad1e2a44fe82e/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6684f14 Nov 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/11.2.0/darwin-arm64/ryanm/fix/cy-in-cy-and-v8-snapshots-6684f14b6d5af6c467330423555ad1e2a44fe82e/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6684f14 Nov 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/11.2.0/win32-x64/ryanm/fix/cy-in-cy-and-v8-snapshots-6684f14b6d5af6c467330423555ad1e2a44fe82e/cypress.tgz

Please sign in to comment.