Skip to content

Commit

Permalink
fixing runner specs
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeke Nierenberg committed Sep 30, 2022
1 parent e5a2bb0 commit d03fca7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
21 changes: 11 additions & 10 deletions runner/src/vm/vm.service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,16 +297,17 @@ describe("responder", () => {
throw new TypeError('oh no') // line 3
}
`;
expect(
runCode({
secretsJson: "{}",
mode: "response",
code: program,
requestsJson: formatRequest({ body: { number: 3 } }),
invalidIdempotencyKeys: [],
state: JSON.stringify({ number: 4 }),
})
).toEqual(

const output = runCode({
secretsJson: "{}",
mode: "response",
code: program,
requestsJson: formatRequest({ body: { number: 3 } }),
invalidIdempotencyKeys: [],
state: JSON.stringify({ number: 4 }),
});

expect(output).toEqual(
expect.objectContaining({
responses: expect.arrayContaining([
expect.objectContaining({
Expand Down
2 changes: 1 addition & 1 deletion runner/src/vm/vm.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const codeBread = {
}
})()
})(${requestsJson}, ${secretsJson})`,
offset: 18 + 18,
offset: 18 + 20,
},
query: {
code: (
Expand Down

0 comments on commit d03fca7

Please sign in to comment.