build(broccoli): improve error messaging from TreeDiffer

This commit is contained in:
Igor Minar
2015-05-27 18:26:28 -07:00
parent 9b0fa0dedc
commit 160c38b5ca
2 changed files with 14 additions and 1 deletions

View File

@ -177,6 +177,17 @@ describe('TreeDiffer', () => {
});
it("should throw an error if an extension isn't prefixed with doc", () => {
// includeExtensions
expect(() => new TreeDiffer('testLabel', 'dir1', ['js']))
.toThrowError("Extension must begin with '.'. Was: 'js'");
// excludeExtentions
expect(() => new TreeDiffer('testLabel', 'dir1', [], ['js']))
.toThrowError("Extension must begin with '.'. Was: 'js'");
});
it('should ignore files with extensions not listed in includeExtensions', () => {
let testDir = {
'dir1': {