Skip to content

Commit

Permalink
Add tests for semicolon rule on ES6 module syntax
Browse files Browse the repository at this point in the history
This prevents regressions on palantir#411
  • Loading branch information
leeavital committed Jun 22, 2015
1 parent f170da3 commit 0cc5d2e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion test/files/rules/semicolon.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,8 @@ interface ITest {
foo?: string
bar: number
baz: boolean; // no error
}
}

import {Router} from 'aurelia-router'; // no error

import {Controller} from 'my-lib' // error
6 changes: 5 additions & 1 deletion test/rules/semicolonRuleTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe("<semicolon>", () => {
});

it("warns on all statements", () => {
assert.equal(actualFailures.length, 19);
assert.equal(actualFailures.length, 20);
});

it("warns on variable statements", () => {
Expand Down Expand Up @@ -85,4 +85,8 @@ describe("<semicolon>", () => {
Lint.Test.assertContainsFailure(actualFailures, createFailure([47, 17], [47, 17]));
Lint.Test.assertContainsFailure(actualFailures, createFailure([48, 16], [48, 16]));
});

it("warns on import statement", () => {
Lint.Test.assertContainsFailure(actualFailures, createFailure([54, 34], [54, 34]));
});
});

0 comments on commit 0cc5d2e

Please sign in to comment.