Skip to content

Commit 5b46370

Browse files
author
Piotr Oleś
committed
Increase integration tests timeout
1 parent 1d6320f commit 5b46370

File tree

2 files changed

+32
-48
lines changed

2 files changed

+32
-48
lines changed

test/integration/index.spec.js

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ var webpack = require('webpack');
77
var ForkTsCheckerWebpackPlugin = require('../../lib/index');
88

99
describe('[INTEGRATION] index', function () {
10+
this.timeout(30000);
1011

1112
function createCompiler(options) {
1213
return webpack({
@@ -33,9 +34,38 @@ describe('[INTEGRATION] index', function () {
3334
});
3435
}
3536

36-
it('should work without configuration', function (callback) {
37-
this.timeout(5000);
37+
it('should allow to pass no options', function () {
38+
expect(function () {
39+
new ForkTsCheckerWebpackPlugin();
40+
}).to.not.throw.error;
41+
});
42+
43+
it('should detect paths', function () {
44+
var plugin = new ForkTsCheckerWebpackPlugin({ tslint: true });
45+
46+
expect(plugin.tsconfig).to.be.equal('./tsconfig.json');
47+
expect(plugin.tslint).to.be.equal('./tslint.json');
48+
});
49+
50+
it('should set logger to console by default', function () {
51+
var plugin = new ForkTsCheckerWebpackPlugin({ });
52+
53+
expect(plugin.logger).to.be.equal(console);
54+
});
55+
56+
it('should set watch to empty array by default', function () {
57+
var plugin = new ForkTsCheckerWebpackPlugin({ });
3858

59+
expect(plugin.watch).to.be.deep.equal([]);
60+
});
61+
62+
it('should set watch to one element array for string', function () {
63+
var plugin = new ForkTsCheckerWebpackPlugin({ watch: '/test' });
64+
65+
expect(plugin.watch).to.be.deep.equal(['/test']);
66+
});
67+
68+
it('should work without configuration', function (callback) {
3969
var compiler = createCompiler();
4070

4171
compiler.run(function (err, stats) {
@@ -45,8 +75,6 @@ describe('[INTEGRATION] index', function () {
4575
});
4676

4777
it('should block emit on build mode', function (callback) {
48-
this.timeout(5000);
49-
5078
var compiler = createCompiler();
5179
compiler.plugin('fork-ts-checker-emit', function () {
5280
expect(true).to.be.true;
@@ -58,8 +86,6 @@ describe('[INTEGRATION] index', function () {
5886

5987

6088
it('should not block emit on watch mode', function (callback) {
61-
this.timeout(5000);
62-
6389
var compiler = createCompiler();
6490
var watching = compiler.watch({}, function() {});
6591

@@ -88,9 +114,6 @@ describe('[INTEGRATION] index', function () {
88114
});
89115

90116
it('should find the same errors on multi-process mode', function (callback) {
91-
// set bigger timeout - it can be a little big long test
92-
this.timeout(10000);
93-
94117
var compilerA = createCompiler({ workers: 1, tslint: true });
95118
var compilerB = createCompiler({ workers: 4, tslint: true });
96119
var errorsA, errorsB, warningsA, warningsB;

test/unit/index.spec.js

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)