gulp-cucumber
Version:
Gulp task for running cucumber.js features
29 lines (25 loc) • 1.04 kB
JavaScript
const expect = require('chai').expect;
const { defineSupportCode } = require('cucumber');
defineSupportCode(({ When, Then }) => {
When(/^the features files are piped to gulp\-cucumber$/, function (callback) {
// Well, the feature files are being piped here right now.
// Otherwise, how could the code get here?
this.meow();
callback();
});
Then(/^Cucumber should run the features$/, function (callback) {
// Well, the features are being run here right now.
// Otherwise, how could the code get here?
expect(100).to.equal(200);
callback();
});
When(/^the scenario is excluded from tests$/, function (callback) {
// Well, the features are being run here right now.
// Otherwise, how could the code get here?
callback();
});
Then(/^this error should be ignored$/, function (callback) {
// Trigger error and if tags option work it will never be called
callback.fail('It should never be called');
});
})