mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-03 13:09:49 -06:00
chore: rewrite flaky server integration test (#26070)
This commit is contained in:
@@ -596,24 +596,8 @@ describe('lib/cypress', () => {
|
||||
it('can change the reporter with cypress.config.js', async function () {
|
||||
sinon.spy(Reporter, 'create')
|
||||
|
||||
await ctx.actions.project.setCurrentProjectAndTestingTypeForTestSetup(this.idsPath)
|
||||
|
||||
setCtx(makeDataContext({}))
|
||||
|
||||
return ctx.lifecycleManager.getFullInitialConfig()
|
||||
.then((cfg) => {
|
||||
this.cfg = cfg
|
||||
|
||||
return settings.read(this.idsPath)
|
||||
}).then((json) => {
|
||||
json.reporter = 'dot'
|
||||
|
||||
return settings.writeForTesting(this.idsPath, json)
|
||||
}).then(async () => {
|
||||
await clearCtx()
|
||||
|
||||
return cypress.start([`--run-project=${this.idsPath}`])
|
||||
}).then(() => {
|
||||
return cypress.start([`--run-project=${this.idsPath}`, `--config-file=${this.idsPath}/cypress.dot-reporter.config.js`])
|
||||
.then(() => {
|
||||
expect(Reporter.create).to.be.calledWith('dot')
|
||||
this.expectExitWith(0)
|
||||
})
|
||||
|
||||
4
system-tests/projects/ids/cypress.dot-reporter.config.js
Normal file
4
system-tests/projects/ids/cypress.dot-reporter.config.js
Normal file
@@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
e2e: {},
|
||||
reporter: 'dot',
|
||||
}
|
||||
Reference in New Issue
Block a user