Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Note: ES6 syntax requires a version of Node.js >= 4.0.0
'use strict';
// Can use any lib (or none, if you choose) to parse args.
// "npm install yargs --save" to use this example as-is
let argv = require('yargs').argv;
const DELIMITER = ',';
const TAG_IDENT = '#';
let tagsOpt = typeof argv.tags === 'string' && argv.tags;
let grepString, tags;
if (tagsOpt) {
tags = tagsOpt.split(DELIMITER);
grepString = tags.map(tag => `${TAG_IDENT}${tag}`).join('|');
}
module.exports = function getMochaTags() {
return grepString;
};
// Note: ES6 syntax requires a version of Node.js >= 4.0.0
'use strict';
let tags = require('./protractor-mocha-tags')();
exports.config = {
framework: 'mocha',
capabilities: { browserName: 'chrome' },
specs: ['tests/**/*.spec.js'],
mochaOpts: {
reporter: 'spec',
grep: tags
}
};
// Note: ES6 syntax requires a version of Node.js >= 4.0.0
'use strict';
describe('Some Feature/Page #feature1', function() {
it('should do some thing #slow', () => {
// assertions
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.