Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Commit

Permalink
Enable broken tests (#2423)
Browse files Browse the repository at this point in the history
Fixes #2405
Fixes #2329
Fixes #2404
  • Loading branch information
nchen63 authored Mar 28, 2017
1 parent 414de72 commit 864a3bc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
5 changes: 2 additions & 3 deletions test/executable/executableTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,10 @@ describe("Executable", function(this: Mocha.ISuiteCallbackContext) {
});

describe("--type-check", () => {
// TODO: #2405
it.skip("exits with code 1 if --project is not passed", (done) => {
it("exits with code 1 if --project is not passed", (done) => {
execCli(["--type-check"], (err) => {
assert.isNotNull(err, "process should exit with error");
assert.strictEqual(err.code, 2, "error code should be 2");
assert.strictEqual(err.code, 1, "error code should be 1");
done();
});
});
Expand Down
9 changes: 4 additions & 5 deletions test/formatters/tapFormatterTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ describe("TAP Formatter", () => {
formatter = new Formatter();
});

// TODO: #2329
it.skip("formats failures", () => {
it("formats failures", () => {
const maxPosition = sourceFile.getFullWidth();

const failures = [
Expand All @@ -43,9 +42,9 @@ describe("TAP Formatter", () => {
];

const expectedResult =
getFailureString(1, "first-name", "error", TEST_FILE, 0, 0, "first failure") +
getFailureString(2, "mid-name", "error", TEST_FILE, 1, 19, "mid failure") +
getFailureString(3, "last-name", "error", TEST_FILE, 0, 12, "last failure");
getFailureString(1, "first-name", "error", TEST_FILE, 0, 0, "first failure") + "\n" +
getFailureString(2, "mid-name", "error", TEST_FILE, 1, 19, "mid failure") + "\n" +
getFailureString(3, "last-name", "error", TEST_FILE, 0, 12, "last failure") + "\n";

const actualResult = formatter.format(failures);
assert.equal(actualResult, `TAP version 13\n1..${failures.length}\n` + expectedResult);
Expand Down
10 changes: 4 additions & 6 deletions test/ruleLoaderTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ describe("Rule Loader", () => {
const srcRulesDir = "src/rules";
const testRulesDir = "test/rules";

// TODO: #2404
it.skip("loads core rules", () => {
it("loads core rules", () => {
const validConfiguration: IOptions[] = [
{ ruleName: "class-name", ruleArguments: [], ruleSeverity: "error", disabledIntervals: [] },
{ ruleName: "eofline", ruleArguments: [], ruleSeverity: "error", disabledIntervals: [] },
Expand All @@ -39,7 +38,7 @@ describe("Rule Loader", () => {
];

const rules = loadRules(validConfiguration, new Map<string, IEnableDisablePosition[]>(), builtRulesDir);
assert.equal(rules.length, 4);
assert.equal(rules.length, 5);
});

it("ignores invalid rules", () => {
Expand Down Expand Up @@ -76,8 +75,7 @@ describe("Rule Loader", () => {
assert.equal(rules.length, 1);
});

// TODO: #2404
it.skip("works with rulesDirectory argument as an Array", () => {
it("works with rulesDirectory argument as an Array", () => {
const validConfiguration: IOptions[] = [
{ ruleName: "class-name", ruleArguments: [], ruleSeverity: "error", disabledIntervals: [] },
{ ruleName: "eofline", ruleArguments: [], ruleSeverity: "error", disabledIntervals: [] },
Expand All @@ -87,7 +85,7 @@ describe("Rule Loader", () => {
];

const rules = loadRules(validConfiguration, new Map<string, IEnableDisablePosition[]>(), [builtRulesDir]);
assert.equal(rules.length, 4);
assert.equal(rules.length, 5);
});

it("loads js rules", () => {
Expand Down

0 comments on commit 864a3bc

Please sign in to comment.