aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts')
-rw-r--r--editors/code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/editors/code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts b/editors/code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts
index f0328893e..4c1467b57 100644
--- a/editors/code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts
+++ b/editors/code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts
@@ -8,20 +8,20 @@ const uri1 = vscode.Uri.file('/file/1');
8const uri2 = vscode.Uri.file('/file/2'); 8const uri2 = vscode.Uri.file('/file/2');
9 9
10const mockDocument1 = ({ 10const mockDocument1 = ({
11 uri: uri1 11 uri: uri1,
12} as unknown) as vscode.TextDocument; 12} as unknown) as vscode.TextDocument;
13 13
14const mockDocument2 = ({ 14const mockDocument2 = ({
15 uri: uri2 15 uri: uri2,
16} as unknown) as vscode.TextDocument; 16} as unknown) as vscode.TextDocument;
17 17
18const range1 = new vscode.Range( 18const range1 = new vscode.Range(
19 new vscode.Position(1, 2), 19 new vscode.Position(1, 2),
20 new vscode.Position(3, 4) 20 new vscode.Position(3, 4),
21); 21);
22const range2 = new vscode.Range( 22const range2 = new vscode.Range(
23 new vscode.Position(5, 6), 23 new vscode.Position(5, 6),
24 new vscode.Position(7, 8) 24 new vscode.Position(7, 8),
25); 25);
26 26
27const diagnostic1 = new vscode.Diagnostic(range1, 'First diagnostic'); 27const diagnostic1 = new vscode.Diagnostic(range1, 'First diagnostic');
@@ -32,7 +32,7 @@ function suggestion1(): SuggestedFix {
32 return new SuggestedFix( 32 return new SuggestedFix(
33 'Replace me!', 33 'Replace me!',
34 new vscode.Location(uri1, range1), 34 new vscode.Location(uri1, range1),
35 'With this!' 35 'With this!',
36 ); 36 );
37} 37}
38 38
@@ -44,7 +44,7 @@ describe('SuggestedFixCollection', () => {
44 // Specify the document and range that exactly matches 44 // Specify the document and range that exactly matches
45 const codeActions = suggestedFixes.provideCodeActions( 45 const codeActions = suggestedFixes.provideCodeActions(
46 mockDocument1, 46 mockDocument1,
47 range1 47 range1,
48 ); 48 );
49 49
50 assert.strictEqual(codeActions.length, 1); 50 assert.strictEqual(codeActions.length, 1);
@@ -66,7 +66,7 @@ describe('SuggestedFixCollection', () => {
66 66
67 const codeActions = suggestedFixes.provideCodeActions( 67 const codeActions = suggestedFixes.provideCodeActions(
68 mockDocument1, 68 mockDocument1,
69 range2 69 range2,
70 ); 70 );
71 71
72 assert(!codeActions || codeActions.length === 0); 72 assert(!codeActions || codeActions.length === 0);
@@ -78,7 +78,7 @@ describe('SuggestedFixCollection', () => {
78 78
79 const codeActions = suggestedFixes.provideCodeActions( 79 const codeActions = suggestedFixes.provideCodeActions(
80 mockDocument2, 80 mockDocument2,
81 range1 81 range1,
82 ); 82 );
83 83
84 assert(!codeActions || codeActions.length === 0); 84 assert(!codeActions || codeActions.length === 0);
@@ -91,7 +91,7 @@ describe('SuggestedFixCollection', () => {
91 91
92 const codeActions = suggestedFixes.provideCodeActions( 92 const codeActions = suggestedFixes.provideCodeActions(
93 mockDocument1, 93 mockDocument1,
94 range1 94 range1,
95 ); 95 );
96 96
97 assert(!codeActions || codeActions.length === 0); 97 assert(!codeActions || codeActions.length === 0);
@@ -106,7 +106,7 @@ describe('SuggestedFixCollection', () => {
106 106
107 const codeActions = suggestedFixes.provideCodeActions( 107 const codeActions = suggestedFixes.provideCodeActions(
108 mockDocument1, 108 mockDocument1,
109 range1 109 range1,
110 ); 110 );
111 111
112 assert.strictEqual(codeActions.length, 1); 112 assert.strictEqual(codeActions.length, 1);