forked from cypress-io/cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsystem_node_spec.js
More file actions
38 lines (33 loc) · 1.13 KB
/
system_node_spec.js
File metadata and controls
38 lines (33 loc) · 1.13 KB
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
37
38
const systemTests = require('../lib/system-tests').default
const execa = require('execa')
const Fixtures = require('../lib/fixtures')
const Promise = require('bluebird')
const systemNode = Fixtures.projectPath('system-node')
describe('e2e system node', () => {
systemTests.setup()
it('uses system node when launching plugins file', function () {
return Promise.join(
execa.stdout('node', ['-v']),
execa.stdout('node', ['-e', 'console.log(process.execPath)']),
(expectedNodeVersion, expectedNodePath) => {
expectedNodeVersion = expectedNodeVersion.slice(1) // v1.2.3 -> 1.2.3
return systemTests.exec(this, {
project: systemNode,
config: {
env: {
expectedNodeVersion,
expectedNodePath,
},
},
spec: 'spec.js',
sanitizeScreenshotDimensions: true,
snapshot: true,
})
.then(({ stderr }) => {
expect(stderr).to.contain(`Plugin Node version: ${expectedNodeVersion}`)
expect(stderr).to.contain('Plugin Electron version: undefined')
})
},
)
})
})