Skip to content

Instantly share code, notes, and snippets.

@dkelosky
Created January 23, 2019 13:40
Show Gist options
  • Save dkelosky/322e80cd7f17e845804d19fe2f5a6959 to your computer and use it in GitHub Desktop.
Save dkelosky/322e80cd7f17e845804d19fe2f5a6959 to your computer and use it in GitHub Desktop.
describe("execution tests", () => {
it("should read all input lines", () => {
test.forEach((testData, index) => {
const file = fs.readFileSync(`output/${testResponse.data.jobid}/RUN${index}/SYSPRINT.txt`).toString().trim();
expect(file).toBe(testData.in);
});
});
it("show our control block is built correctly", () => {
const responses = fs.readFileSync(`output/${testResponse.data.jobid}/RUN0/SNAP.txt`).toString().split('\n');
let index;
responses.forEach((response, x) => {
if (response.indexOf("Important Control Block") > -1) {
index = x + 1;
}
});
expect(index).toBeDefined();
if (index) expect(responses[index].substr(9, responses[index].length)).toMatchSnapshot();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment