UNPKG

407 BJavaScriptView Raw
1'use strict';
2
3const astUtil = require('../util/ast');
4
5module.exports = function (context) {
6 return {
7 CallExpression(node) {
8 if (astUtil.isHookIdentifier(node.callee)) {
9 context.report({
10 node: node.callee,
11 message: `Unexpected use of Mocha \`${ node.callee.name }\` hook`
12 });
13 }
14 }
15 };
16};