Skip to content

Commit f4a9893

Browse files
committed
Add a failing test for #1570.
1 parent 89a73db commit f4a9893

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

‎test/dart_only/providers/ignore_lint_code_action_provider.test.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ describe("ignore_lint_code_action_provider", () => {
1818
assert.ok(ignoreLintAction);
1919
});
2020

21+
it("puts ignore options at the end of the list", async () => {
22+
await openFile(emptyFile);
23+
await setTestContent(`main() {
24+
var a = 1;
25+
}`);
26+
const fixResults = await (vs.commands.executeCommand("vscode.executeCodeActionProvider", currentDoc().uri, rangeOf("|a| = 1")) as Thenable<vs.CodeAction[]>);
27+
assert.ok(fixResults);
28+
assert.ok(fixResults.length);
29+
30+
const index = fixResults.findIndex((r) => r.title.indexOf("Ignore hint 'unused_local_variable' for this line") !== -1);
31+
assert.equal(index, fixResults.length - 1);
32+
});
33+
2134
it("edits in '// ignore: ' comment", async () => {
2235
await openFile(emptyFile);
2336
await setTestContent(`main() {

‎test/test_projects/hello_world/.vscode/settings.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@
77
],
88
"dart.analysisExcludedFolders": [
99
"lib/excluded"
10-
]
10+
],
11+
"dart.sdkPath": "/Users/dantup/Dev/dart-sdk/nightly-2019-04-01",
12+
"dart.showIgnoreQuickFixes": true
1113
}

0 commit comments

Comments
 (0)