Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"timeout": 20000
}
26 changes: 13 additions & 13 deletions tests/ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ describe('--help', () => {
assertTestSuccess(runResult);
// ensure we have a non-empty output
assert.ok(runResult.stdout.length > 0);
}).timeout(5000);
});
});

describe('--version', () => {
it('Should print the version and exit indicating success', () => {
const runResult = execElmTest(['--version']);
assertTestSuccess(runResult);
assert.strictEqual(elmTestVersion, runResult.stdout.trim());
}).timeout(5000);
});
});

/* Test examples */
Expand All @@ -148,18 +148,18 @@ describe('Testing elm-test on an example application', () => {
const args = path.join('tests', '*Pass*.elm');
const runResult = execElmTest([args], cwd);
assertTestSuccess(runResult);
}).timeout(60000);
});

it('Should fail for failing tests', () => {
const args = path.join('tests', '*Fail*.elm');
const runResult = execElmTest([args], cwd);
assertTestFailure(runResult);
}).timeout(60000);
});

it('Should successfully run `elm-test make`', () => {
const runResult = execElmTest(['make'], cwd);
assertTestSuccess(runResult);
}).timeout(60000);
});
});

describe('Testing elm-test on an example package', () => {
Expand All @@ -169,18 +169,18 @@ describe('Testing elm-test on an example package', () => {
const args = path.join('tests', '*Pass*.elm');
const runResult = execElmTest([args], cwd);
assertTestSuccess(runResult);
}).timeout(60000);
});

it('Should fail for failing tests', () => {
const args = path.join('tests', '*Fail*.elm');
const runResult = execElmTest([args], cwd);
assertTestFailure(runResult);
}).timeout(60000);
});

it('Should successfully run `elm-test make`', () => {
const runResult = execElmTest(['make'], cwd);
assertTestSuccess(runResult);
}).timeout(60000);
});
});

describe('Testing elm-test on example-application-src', () => {
Expand All @@ -189,7 +189,7 @@ describe('Testing elm-test on example-application-src', () => {
it('Should pass successfully', () => {
const runResult = execElmTest(['src'], cwd);
assertTestSuccess(runResult);
}).timeout(60000);
});
});

describe('Testing elm-test on an application with no tests', () => {
Expand All @@ -198,7 +198,7 @@ describe('Testing elm-test on an application with no tests', () => {
it('Should fail due to missing tests', () => {
const runResult = execElmTest([], cwd);
assertTestFailure(runResult);
}).timeout(60000);
});
});

/* ci tests on single elm files */
Expand All @@ -220,7 +220,7 @@ describe('Testing elm-test on single Elm files', () => {
const itsPath = path.join('tests', 'Passing', testToRun);
const runResult = execElmTest([itsPath], cwd);
assertTestSuccess(runResult);
}).timeout(10000);
});
}

it(`Should run every file in tests/Passing`, () => {
Expand All @@ -245,7 +245,7 @@ describe('Testing elm-test on single Elm files', () => {
const itsPath = path.join('tests', 'Failing', testToRun);
const runResult = execElmTest([itsPath], cwd);
assertTestFailure(runResult);
}).timeout(10000);
});
}

it(`Should run every file in tests/Failing`, () => {
Expand All @@ -261,7 +261,7 @@ describe('Testing elm-test on single Elm files', () => {
const itsPath = path.join('tests', 'RuntimeException', testToRun);
const runResult = execElmTest([itsPath], cwd);
assertTestErrored(runResult);
}).timeout(10000);
});
}

it(`Should run every file in tests/RuntimeException`, () => {
Expand Down
Loading
Loading