mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-03 10:40:06 +00:00
26 lines
706 B
TypeScript
26 lines
706 B
TypeScript
import SASjs from "@sasjs/adapter";
|
|
import { TestSuite } from "@sasjs/test-framework";
|
|
|
|
const data: any = { table1: [{ col1: "first col value" }] };
|
|
|
|
export const sasjsRequestTests = (adapter: SASjs): TestSuite => ({
|
|
name: "SASjs Requests",
|
|
tests: [
|
|
{
|
|
title: "WORK tables",
|
|
description: "Should get WORK tables after request",
|
|
test: async () => {
|
|
return adapter.request("common/sendArr", data);
|
|
},
|
|
assertion: () => {
|
|
const requests = adapter.getSasRequests();
|
|
if (adapter.getSasjsConfig().debug) {
|
|
return requests[0].SASWORK !== null;
|
|
} else {
|
|
return requests[0].SASWORK === null;
|
|
}
|
|
},
|
|
},
|
|
],
|
|
});
|