-
-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Piotr Oleś
committed
Jun 4, 2017
1 parent
8bce60f
commit c2aea83
Showing
6 changed files
with
52 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
var describe = require('mocha').describe; | ||
var it = require('mocha').it; | ||
var expect = require('chai').expect; | ||
var ForkTsCheckerWebpackPlugin = require('../../lib/index'); | ||
|
||
describe('[UNIT] index', function () { | ||
|
||
it('should allow to pass no options', function () { | ||
expect(function () { | ||
new ForkTsCheckerWebpackPlugin(); | ||
}).to.not.throw.error; | ||
}); | ||
|
||
it('should detect paths', function () { | ||
var plugin = new ForkTsCheckerWebpackPlugin({ tslint: true }); | ||
|
||
expect(plugin.tsconfig).to.be.equal('./tsconfig.json'); | ||
expect(plugin.tslint).to.be.equal('./tslint.json'); | ||
}); | ||
|
||
it('should set logger to console by default', function () { | ||
var plugin = new ForkTsCheckerWebpackPlugin({ }); | ||
|
||
expect(plugin.logger).to.be.equal(console); | ||
}); | ||
|
||
it('should set watch to empty array by default', function () { | ||
var plugin = new ForkTsCheckerWebpackPlugin({ }); | ||
|
||
expect(plugin.watch).to.be.deep.equal([]); | ||
}); | ||
|
||
it('should set watch to one element array for string', function () { | ||
var plugin = new ForkTsCheckerWebpackPlugin({ watch: '/test' }); | ||
|
||
expect(plugin.watch).to.be.deep.equal(['/test']); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters