File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ module.exports = {
32
32
} ,
33
33
create ( context ) {
34
34
const astUtils = createAstUtils ( context . settings ) ;
35
+ const isTestCase = astUtils . buildIsTestCaseAnswerer ( ) ;
36
+ const isDescribe = astUtils . buildIsDescribeAnswerer ( ) ;
37
+
35
38
const options = context . options [ 0 ] || { } ;
36
39
const allowedHooks = options . allow || [ ] ;
37
40
let layers = [ ] ;
@@ -57,7 +60,7 @@ module.exports = {
57
60
. forEach ( function ( hookNode ) {
58
61
context . report ( {
59
62
node : hookNode ,
60
- message : `Unexpected use of Mocha \`${ hookNode . name } \` hook for a single test case`
63
+ message : `Unexpected use of Mocha \`${ hookNode . name } \` hook for a single test case`
61
64
} ) ;
62
65
} ) ;
63
66
}
@@ -71,13 +74,13 @@ module.exports = {
71
74
} ,
72
75
73
76
CallExpression ( node ) {
74
- if ( astUtils . isDescribe ( node ) ) {
77
+ if ( isDescribe ( node ) ) {
75
78
increaseTestCount ( ) ;
76
79
layers . push ( newDescribeLayer ( node ) ) ;
77
80
return ;
78
81
}
79
82
80
- if ( astUtils . isTestCase ( node ) ) {
83
+ if ( isTestCase ( node ) ) {
81
84
increaseTestCount ( ) ;
82
85
}
83
86
You can’t perform that action at this time.
0 commit comments