Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

32 rindas
815 B

'use strict';
const createAstUtils = require('../util/ast');
module.exports = {
meta: {
type: 'suggestion',
docs: {
description: 'Disallow pending tests'
}
},
create(context) {
const astUtils = createAstUtils(context.settings);
function isPendingMochaTest(node) {
return astUtils.isTestCase(node) &&
node.arguments.length === 1 &&
node.arguments[0].type === 'Literal';
}
return {
CallExpression(node) {
if (node.callee && isPendingMochaTest(node)) {
context.report({
node,
message: 'Unexpected pending mocha test.'
});
}
}
};
}
};