chore: rewrite flaky server integration test (#26070)

This commit is contained in:
Ryan Manuel
2023-03-10 00:20:08 +00:00
committed by GitHub
parent e576e2cada
commit 20cd105252
2 changed files with 6 additions and 18 deletions

View File

@@ -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)
})

View File

@@ -0,0 +1,4 @@
module.exports = {
e2e: {},
reporter: 'dot',
}