Skip to content

Commit

Permalink
Merge pull request palantir#453 from leeavital/test/semicolon
Browse files Browse the repository at this point in the history
Add tests for semicolon rule on ES6 module syntax
  • Loading branch information
adidahiya committed Jun 22, 2015
2 parents 83a1e97 + 0cc5d2e commit 8bb71c0
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 8bb71c0

Please sign in to comment.