Created
January 23, 2019 13:40
-
-
Save dkelosky/322e80cd7f17e845804d19fe2f5a6959 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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