1
1
import { ResultStatus , FailedResult } from "../types" ;
2
- import { convertConfig , ConvertConfigDependencies } from "./convertConfig " ;
2
+ import { convertLintConfig , ConvertLintConfigDependencies } from "./convertLintConfig " ;
3
3
4
4
const stubSettings = {
5
5
config : "./eslintrc.js" ,
6
6
} ;
7
7
8
8
const createStubDependencies = (
9
- overrides : Partial < ConvertConfigDependencies > = { } ,
10
- ) : ConvertConfigDependencies => ( {
9
+ overrides : Partial < ConvertLintConfigDependencies > = { } ,
10
+ ) : ConvertLintConfigDependencies => ( {
11
11
convertComments : jest . fn ( ) ,
12
12
convertRules : jest . fn ( ) ,
13
13
findOriginalConfigurations : jest . fn ( ) . mockResolvedValue ( {
@@ -40,7 +40,7 @@ const createStubOriginalConfigurationsData = () => ({
40
40
} ,
41
41
} ) ;
42
42
43
- describe ( "convertConfig " , ( ) => {
43
+ describe ( "convertLintConfig " , ( ) => {
44
44
it ( "returns the failure result when finding the original configurations fails" , async ( ) => {
45
45
// Arrange
46
46
const findError : FailedResult = {
@@ -52,7 +52,7 @@ describe("convertConfig", () => {
52
52
} ) ;
53
53
54
54
// Act
55
- const result = await convertConfig ( dependencies , stubSettings ) ;
55
+ const result = await convertLintConfig ( dependencies , stubSettings ) ;
56
56
57
57
// Assert
58
58
expect ( result ) . toEqual ( findError ) ;
@@ -66,7 +66,7 @@ describe("convertConfig", () => {
66
66
} ) ;
67
67
68
68
// Act
69
- const result = await convertConfig ( dependencies , stubSettings ) ;
69
+ const result = await convertLintConfig ( dependencies , stubSettings ) ;
70
70
71
71
// Assert
72
72
expect ( result ) . toEqual ( {
@@ -86,7 +86,7 @@ describe("convertConfig", () => {
86
86
} ) ;
87
87
88
88
// Act
89
- const result = await convertConfig ( dependencies , stubSettings ) ;
89
+ const result = await convertLintConfig ( dependencies , stubSettings ) ;
90
90
91
91
// Assert
92
92
expect ( result ) . toEqual ( convertCommentsResult ) ;
@@ -102,7 +102,7 @@ describe("convertConfig", () => {
102
102
} ) ;
103
103
104
104
// Act
105
- const result = await convertConfig ( dependencies , stubSettings ) ;
105
+ const result = await convertLintConfig ( dependencies , stubSettings ) ;
106
106
107
107
// Assert
108
108
expect ( result ) . toEqual ( convertCommentsResult ) ;
0 commit comments