Skip to content

Instantly share code, notes, and snippets.

@rianby64
Created March 9, 2016 09:05
Show Gist options
  • Save rianby64/a87a9c3c24259105fee7 to your computer and use it in GitHub Desktop.
Save rianby64/a87a9c3c24259105fee7 to your computer and use it in GitHub Desktop.
'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