1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-14 23:50:06 +00:00

fix: computeApi debug override

This commit is contained in:
Mihajlo Medjedovic
2020-11-24 15:19:19 +01:00
parent e36b511530
commit 011e2d83dc
5 changed files with 21 additions and 21 deletions

View File

@@ -23,7 +23,7 @@ export const sasjsRequestTests = (adapter: SASjs): TestSuite => ({
},
{
title: "Make error and capture log",
description: "Should make an error and capture log",
description: "Should make an error and capture log, in the same time it is testing if debug override is working",
test: async () => {
return new Promise(async (resolve, reject) => {
adapter
@@ -33,12 +33,14 @@ export const sasjsRequestTests = (adapter: SASjs): TestSuite => ({
})
.catch((err) => {
let sasRequests = adapter.getSasRequests();
let makeErrRequest =
let makeErrRequest: any =
sasRequests.find((req) =>
req.serviceLink.includes("makeErr")
) || null;
resolve(!!makeErrRequest);
if (!makeErrRequest) resolve(false)
resolve(!!(makeErrRequest.logFile && makeErrRequest.logFile.length > 0));
});
});
},