mirror of
https://github.com/xodio/xod.git
synced 2026-03-12 11:46:49 +01:00
test(xod-patch-search): fix test handling of Promise rejection in before script
This commit is contained in:
@@ -12,11 +12,14 @@ describe('xod-patch-search/index', () => {
|
||||
const workspace = path.resolve(__dirname, '../../../workspace');
|
||||
const getProjectPath = projectName => path.resolve(workspace, projectName);
|
||||
|
||||
before(async () => {
|
||||
const project = await loadProject(getProjectPath('welcome-to-xod'));
|
||||
indexData = createIndexData(listPatches(project));
|
||||
idx = createIndex(indexData);
|
||||
});
|
||||
before(() => loadProject(getProjectPath('welcome-to-xod'))
|
||||
.then(listPatches)
|
||||
.then(createIndexData)
|
||||
.then((iData) => {
|
||||
indexData = iData;
|
||||
idx = createIndex(indexData);
|
||||
})
|
||||
);
|
||||
|
||||
it('searches by path correctly', () => {
|
||||
const result = idx.search('path:number');
|
||||
|
||||
Reference in New Issue
Block a user