Merge pull request #133 from bharathbdev/bugfix/assertion-result-issue

Bugfix/assertion result issue
This commit is contained in:
Anoop M D 2023-03-19 14:57:19 +05:30 committed by GitHub
commit 04c3c2dbf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,16 +169,14 @@ const registerNetworkIpc = (mainWindow, watcher, lastOpenedCollections) => {
// run assertions // run assertions
const assertions = get(request, 'assertions'); const assertions = get(request, 'assertions');
if(assertions && assertions.length) { const assertRuntime = new AssertRuntime();
const assertRuntime = new AssertRuntime(); const results = assertRuntime.runAssertions(assertions, request, response, envVars, collectionVariables, collectionPath);
const results = assertRuntime.runAssertions(assertions, request, response, envVars, collectionVariables, collectionPath);
mainWindow.webContents.send('main:assertion-results', { mainWindow.webContents.send('main:assertion-results', {
results: results, results: results,
itemUid: item.uid, itemUid: item.uid,
collectionUid collectionUid
}); });
}
// run tests // run tests
const testFile = get(item, 'request.tests'); const testFile = get(item, 'request.tests');