Created
March 9, 2016 09:05
-
-
Save rianby64/a87a9c3c24259105fee7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
window.feature = apolog.feature; | |
window.scenario = apolog.scenario; | |
window.step = apolog.step; | |
window.given = apolog.given; | |
window.when = apolog.when; | |
window.then = apolog.then; | |
window.but = apolog.but; | |
window.and = apolog.and; | |
window.run = apolog.run; | |
apolog.setup({ | |
bdd: { | |
describe: suite, | |
it: test | |
} | |
}); | |
window.loadFeatures = (features) => { | |
return Promise.all(features.map((feature_path) => { | |
return fetch(feature_path).then((response) => { | |
return response.text(); | |
}).then((feature) => { | |
return apolog.loadFeature(feature, feature_path); | |
}); | |
})); | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment