Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

31 rader
889 B

'use strict';
const createAstUtils = require('../util/ast');
module.exports = {
meta: {
docs: {
description: 'Disallow skipped tests'
},
type: 'problem'
},
create(context) {
const astUtils = createAstUtils(context.settings);
return {
CallExpression(node) {
const options = { modifiers: [ 'skip' ], modifiersOnly: true };
if (astUtils.isDescribe(node, options) || astUtils.isTestCase(node, options)) {
const callee = node.callee;
const nodeToReport = callee.type === 'MemberExpression' ? callee.property : callee;
context.report({
node: nodeToReport,
message: 'Unexpected skipped mocha test.'
});
}
}
};
}
};