Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
FGRCL committed Jul 29, 2024
1 parent 93d6d70 commit 664f996
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions frontend/test/server/blockSerialization.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ describe("blockSerialization", () => {
fs.readFile.mockResolvedValueOnce(blockComputationsSourceCode);
app.isPackaged = false;
fileExists.mockResolvedValueOnce(true);
spawnSync.mockReturnValueOnce({ stdout: JSON.stringify(expectedSpecs), stderr: undefined, status: 0, error: undefined });
spawnSync.mockReturnValueOnce({
stdout: JSON.stringify(expectedSpecs),
stderr: undefined,
status: 0,
error: undefined,
});

const result = await compileComputation("new-python-123");

Expand All @@ -66,7 +71,12 @@ describe("blockSerialization", () => {
fs.readFile.mockResolvedValueOnce(blockComputationsSourceCode);
app.isPackaged = false;
fileExists.mockResolvedValueOnce(true);
spawnSync.mockReturnValueOnce({ stdout: undefined, stderr: "something bad happened", status: 1, error: undefined});
spawnSync.mockReturnValueOnce({
stdout: undefined,
stderr: "something bad happened",
status: 1,
error: undefined,
});

expect(() => compileComputation("new-python-123")).rejects.toThrowError();
});
Expand All @@ -75,7 +85,12 @@ describe("blockSerialization", () => {
fs.readFile.mockResolvedValueOnce(blockComputationsSourceCode);
app.isPackaged = false;
fileExists.mockResolvedValueOnce(true);
spawnSync.mockReturnValueOnce({ stdout: undefined, stderr: undefined, status: undefined, error: {}});
spawnSync.mockReturnValueOnce({
stdout: undefined,
stderr: undefined,
status: undefined,
error: {},
});

expect(() => compileComputation("new-python-123")).rejects.toThrowError();
});
Expand Down

0 comments on commit 664f996

Please sign in to comment.