Skip to content

Instantly share code, notes, and snippets.

@felipesere
Created November 1, 2018 10:54
Show Gist options
  • Save felipesere/d1a2913d3a6cfbac0fb787029fd03caf to your computer and use it in GitHub Desktop.
Save felipesere/d1a2913d3a6cfbac0fb787029fd03caf to your computer and use it in GitHub Desktop.
folder specific hooks?
Folder structure:
Root
|--A
| |--a1.spec
| |--a2.spec
| |--a3.spec
|
|--B
| |--b1.spec
| |--b2.spec
|
|--suites.js
in suites.js:
describe('my app', () = {
describe('with feature-toggle A enabled', () => {
before(() => {
launchApp({a_enabled: true})
})
after(() => {
closeApp()
})
// Magically run all tests in subfolder A!
})
describe('with feature-toggle B enabled', () => {
before(() => {
launchApp({b_enabled: true})
})
after(() => {
closeApp()
})
// Magically run all tests in subfolder B!
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment