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

Commit c56bdcb

Browse files
author
Roman Gafurov
committed
fix(test): improve some tests
1 parent 830be2e commit c56bdcb

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"fs-extra": "^0.30.0",
2323
"gemini-configparser": "^0.1.1",
2424
"gemini-coverage": "^1.0.0",
25-
"glob-extra": "^1.3.0",
25+
"glob-extra": "^1.3.2",
2626
"handlebars": "^4.0.5",
2727
"inherit": "~2.2.1",
2828
"install": "^0.6.1",

test/unit/test-reader/index.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,10 @@ describe('test-reader', () => {
198198
}
199199
};
200200

201-
return assert.isRejected(readTests_({paths: ['other/path'], config}), /Cannot find files/);
201+
globExtra.expandPaths.withArgs(['some/path']).returns(Promise.resolve(['/some/path/file1.js']));
202+
globExtra.expandPaths.withArgs(['other/path']).returns(Promise.resolve(['/other/path/file1.js']));
203+
204+
return assert.isRejected(readTests_({paths: ['other/path'], config}), 'Cannot find files by masks in sets');
202205
});
203206

204207
describe('files of sets are specified as masks', () => {
@@ -247,9 +250,10 @@ describe('test-reader', () => {
247250
}
248251
};
249252

250-
globExtra.expandPaths.withArgs(['other/path']).returns(Promise.resolve(['/root/other/path/file1.js']));
253+
globExtra.expandPaths.withArgs(['some/path']).returns(Promise.resolve(['/some/path/file1.js']));
254+
globExtra.expandPaths.withArgs(['other/path']).returns(Promise.resolve(['/other/path/file1.js']));
251255

252-
return assert.isRejected(readTests_({paths: ['other/path'], config}), /Cannot find files/);
256+
return assert.isRejected(readTests_({paths: ['other/path'], config}), 'Cannot find files by masks in sets');
253257
});
254258
});
255259

0 commit comments

Comments
 (0)