You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 31, 2023. It is now read-only.
@@ -213,7 +213,7 @@ CYPRESS_ENVIRONMENT=staging npx cypress run
213
213
Inside the spec file you can write
214
214
215
215
```js
216
-
import {onlyOn} from'@cypress/skip-test'
216
+
import {onlyOn, skipOn} from'@cypress/skip-test'
217
217
conststubServer= () => {
218
218
cy.server()
219
219
cy.route('/api/me', 'fx:me.json')
@@ -224,9 +224,12 @@ it('works', () => {
224
224
onlyOn('staging', stubServer)
225
225
...
226
226
})
227
+
skipOn('staging', () => {
228
+
it('works on non-staging', () => {...})
229
+
})
227
230
```
228
231
229
-
The test `works` will stub network calls when running on `staging`, but will skip calling `stubServer` for other environments.
232
+
The test `works` will stub network calls when running on `staging`, but will skip calling `stubServer` for other environments. The test `works on non-staging` will be skipped when the environment is `staging`.
0 commit comments