File tree Expand file tree Collapse file tree 1 file changed +18
-14
lines changed
Expand file tree Collapse file tree 1 file changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -126,21 +126,25 @@ context('Typescript', function () {
126126 } ,
127127 }
128128
129+ const isLT4 = process . env . ESLINT_VERSION === '3' || process . env . ESLINT_VERSION === '2' ;
130+ const valid = [
131+ test ( Object . assign ( {
132+ code : `
133+ export const Foo = 1;
134+ export interface Foo {}
135+ ` ,
136+ } , parserConfig ) ) ,
137+ ]
138+ if ( ! isLT4 ) {
139+ valid . unshift ( test ( Object . assign ( {
140+ code : `
141+ export const Foo = 1;
142+ export type Foo = number;
143+ ` ,
144+ } , parserConfig ) ) )
145+ }
129146 ruleTester . run ( 'export' , rule , {
130- valid : [
131- test ( Object . assign ( {
132- code : `
133- export const Foo = 1;
134- export type Foo = number;
135- ` ,
136- } , parserConfig ) ,
137- test ( Object . assign ( {
138- code : `
139- export const Foo = 1;
140- export interface Foo {}
141- ` ,
142- } , parserConfig ) ) ) ,
143- ] ,
147+ valid : valid ,
144148 invalid : [ ] ,
145149 } )
146150 } )
You can’t perform that action at this time.
0 commit comments