forked from cypress-io/cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask_spec.js
30 lines (25 loc) · 861 Bytes
/
task_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
const systemTests = require('../lib/system-tests').default
describe('e2e task', () => {
systemTests.setup()
it('handles undefined return and includes stack trace in error', function () {
return systemTests.exec(this, {
spec: 'task.cy.js',
snapshot: true,
expectedExitCode: 2,
})
.then(({ stdout }) => {
// should include a stack trace from plugins file
const match = stdout.match(/at errors(.*)\n/)
expect(match).not.to.be.null
expect(match[0]).to.include('plugins/index.js')
})
})
it('merges task events on subsequent registrations and logs warning for conflicts', function () {
return systemTests.exec(this, {
project: 'multiple-task-registrations',
spec: 'multiple_task_registrations.cy.js',
sanitizeScreenshotDimensions: true,
snapshot: true,
})
})
})