Просмотр исходного кода

Stop Cypress if a test failed

Some tests depend on previous tests (i.e. creating a replica / migration
depends on creating the 2 endpoints), so it is safer to stop all the
tests after the failed one.
Sergiu Miclea 8 лет назад
Родитель
Сommit
368673a916
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      private/cypress/support/index.js

+ 4 - 0
private/cypress/support/index.js

@@ -1,2 +1,6 @@
 // @flow
+
 import './commands'
+
+/* eslint func-names: off */
+afterEach(function () { if (this.currentTest.state === 'failed') { Cypress.runner.stop() } })