forked from cypress-io/cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsystem_node_spec.js
36 lines (30 loc) · 1.04 KB
/
system_node_spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const systemTests = require('../lib/system-tests').default
const execa = require('execa')
let expectedNodeVersion
let expectedNodePath
describe('e2e system node', () => {
before(async () => {
// Grab the system node version and path before running the tests.
expectedNodeVersion = (await execa('node', ['-v'])).stdout.slice(1)
expectedNodePath = (await execa('node', ['-e', 'console.log(process.execPath)'])).stdout
})
systemTests.setup()
it('uses default node when launching plugins file', async function () {
const { stderr } = await systemTests.exec(this, {
project: 'system-node',
userNodePath: expectedNodePath,
userNodeVersion: expectedNodeVersion,
config: {
env: {
expectedNodeVersion,
expectedNodePath,
},
},
spec: 'default.spec.js',
sanitizeScreenshotDimensions: true,
snapshot: true,
})
expect(stderr).to.contain(`Plugin Node version: ${expectedNodeVersion}`)
expect(stderr).to.contain('Plugin Electron version: undefined')
})
})