Skip to content

Commit

Permalink
Use const, style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
leeavital committed Jun 23, 2015
1 parent 21d1ec5 commit 1a0a193
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/rules/noAnyRuleTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,29 @@ describe("<no-any>", () => {
const createFailure = Lint.Test.createFailuresOnFile(fileName, NoAnyRule.FAILURE_STRING);

it("disallows variables with type 'any'", () => {
let expectedFailures = [createFailure([1, 8], [1, 11]),
createFailure([7, 8], [7, 11]),
createFailure([8, 8], [8, 11])];
const expectedFailures = [
createFailure([1, 8], [1, 11]),
createFailure([7, 8], [7, 11]),
createFailure([8, 8], [8, 11])
];

for (let failure of expectedFailures) {
Lint.Test.assertContainsFailure(actualFailures, failure);
}
});

it("disallows functions with parameter type 'any'", () => {
let expectedFailure = createFailure([3, 17], [3, 20]);
const expectedFailure = createFailure([3, 17], [3, 20]);
Lint.Test.assertContainsFailure(actualFailures, expectedFailure);
});

it("disallows functions with return type 'any'", () => {
let expectedFailure = createFailure([3, 24], [3, 27]);
const expectedFailure = createFailure([3, 24], [3, 27]);
Lint.Test.assertContainsFailure(actualFailures, expectedFailure);
});

it("catches destructuring bindings with member types of 'any'", () => {
let expectedFailure = createFailure([10, 23], [10, 26]);
const expectedFailure = createFailure([10, 23], [10, 26]);
Lint.Test.assertContainsFailure(actualFailures, expectedFailure);
});

Expand Down

0 comments on commit 1a0a193

Please sign in to comment.