File tree Expand file tree Collapse file tree 2 files changed +7
-23
lines changed
typescript-estree/tests/lib Expand file tree Collapse file tree 2 files changed +7
-23
lines changed Original file line number Diff line number Diff line change @@ -33,12 +33,12 @@ describe('parser', () => {
33
33
it ( 'parseAndGenerateServices() should be called with options' , ( ) => {
34
34
const code = 'const valid = true;' ;
35
35
const spy = jest . spyOn ( typescriptESTree , 'parseAndGenerateServices' ) ;
36
- parseForESLint ( code , {
36
+ const config = {
37
37
loc : false ,
38
38
comment : false ,
39
39
range : false ,
40
40
tokens : false ,
41
- sourceType : 'module' ,
41
+ sourceType : 'module' as 'module' ,
42
42
ecmaVersion : 10 ,
43
43
ecmaFeatures : {
44
44
globalReturn : false ,
@@ -50,29 +50,13 @@ describe('parser', () => {
50
50
useJSXTextNode : false ,
51
51
errorOnUnknownASTType : false ,
52
52
errorOnTypeScriptSyntacticAndSemanticIssues : false ,
53
- tsconfigRootDir : '../.. /' ,
53
+ tsconfigRootDir : './' ,
54
54
extraFileExtensions : [ 'foo' ]
55
- } ) ;
55
+ } ;
56
+ parseForESLint ( code , config ) ;
56
57
expect ( spy ) . toHaveBeenCalledWith ( code , {
57
58
jsx : false ,
58
- loc : false ,
59
- comment : false ,
60
- range : false ,
61
- tokens : false ,
62
- sourceType : 'module' ,
63
- ecmaVersion : 10 ,
64
- ecmaFeatures : {
65
- globalReturn : false ,
66
- jsx : false
67
- } ,
68
- // ts-estree specific
69
- filePath : 'test/foo' ,
70
- project : 'tsconfig.json' ,
71
- useJSXTextNode : false ,
72
- errorOnUnknownASTType : false ,
73
- errorOnTypeScriptSyntacticAndSemanticIssues : false ,
74
- tsconfigRootDir : '../../' ,
75
- extraFileExtensions : [ 'foo' ]
59
+ ...config
76
60
} ) ;
77
61
} ) ;
78
62
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import {
22
22
VariableDeclaration ,
23
23
ClassDeclaration ,
24
24
ClassProperty
25
- } from '../../src/typedefs ' ;
25
+ } from '../../src/ts-estree ' ;
26
26
27
27
//------------------------------------------------------------------------------
28
28
// Setup
You can’t perform that action at this time.
0 commit comments