Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

31 righe
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.'
});
}
}
};
}
};