Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Commit

Permalink
fix(test): improve some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Gafurov committed Oct 25, 2016
1 parent 830be2e commit c56bdcb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"fs-extra": "^0.30.0",
"gemini-configparser": "^0.1.1",
"gemini-coverage": "^1.0.0",
"glob-extra": "^1.3.0",
"glob-extra": "^1.3.2",
"handlebars": "^4.0.5",
"inherit": "~2.2.1",
"install": "^0.6.1",
Expand Down
10 changes: 7 additions & 3 deletions test/unit/test-reader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,10 @@ describe('test-reader', () => {
}
};

return assert.isRejected(readTests_({paths: ['other/path'], config}), /Cannot find files/);
globExtra.expandPaths.withArgs(['some/path']).returns(Promise.resolve(['/some/path/file1.js']));
globExtra.expandPaths.withArgs(['other/path']).returns(Promise.resolve(['/other/path/file1.js']));

return assert.isRejected(readTests_({paths: ['other/path'], config}), 'Cannot find files by masks in sets');
});

describe('files of sets are specified as masks', () => {
Expand Down Expand Up @@ -247,9 +250,10 @@ describe('test-reader', () => {
}
};

globExtra.expandPaths.withArgs(['other/path']).returns(Promise.resolve(['/root/other/path/file1.js']));
globExtra.expandPaths.withArgs(['some/path']).returns(Promise.resolve(['/some/path/file1.js']));
globExtra.expandPaths.withArgs(['other/path']).returns(Promise.resolve(['/other/path/file1.js']));

return assert.isRejected(readTests_({paths: ['other/path'], config}), /Cannot find files/);
return assert.isRejected(readTests_({paths: ['other/path'], config}), 'Cannot find files by masks in sets');
});
});

Expand Down

0 comments on commit c56bdcb

Please sign in to comment.