Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaLRussell committed Aug 30, 2023
1 parent f32c6e7 commit d3f8a94
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import { mockBookNew, mockBookAppendSheet, mockWriteFile } from "./mocks";
import { mockBasicState, mockRunState, mockSensitivityState } from "../../mocks";
import { WodinSensitivitySummaryDownload } from "../../../src/app/excel/wodinSensitivitySummaryDownload";

const xValues = [1, 1.1, 1.2];
const xValues = [
{ beta: 1 },
{ beta: 1.1 },
{ beta: 1.2 }
];
const mockBatch = {
valueAtTime: jest.fn().mockImplementation(() => {
return {
Expand Down
14 changes: 10 additions & 4 deletions app/static/tests/unit/serialiser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,18 @@ describe("serialise", () => {

const sensitivityBatchPars = {
base: { alpha: 1, beta: 1.1 },
name: "alpha",
values: [0.5, 0.75, 1, 1.25, 1.5]
varying: [{
name: "alpha",
values: [0.5, 0.75, 1, 1.25, 1.5]
}]
};

const sensitivityParamSetBatchPars = {
base: { alpha: 2, beta: 3.3 },
name: "alpha",
values: [1.5, 1.75, 2, 2.25, 2.5]
varying: [{
name: "alpha",
values: [1.5, 1.75, 2, 2.25, 2.5]
}]
};
const sensitivityState = {
running: true,
Expand Down Expand Up @@ -179,6 +183,7 @@ describe("serialise", () => {
pars: sensitivityBatchPars,
solutions: [jest.fn(), jest.fn()],
errors: [],
successfulVaryingParams: [],
valueAtTime: jest.fn(),
extreme: jest.fn(),
compute: jest.fn()
Expand All @@ -195,6 +200,7 @@ describe("serialise", () => {
pars: sensitivityParamSetBatchPars,
solutions: [jest.fn(), jest.fn()],
errors: [],
successfulVaryingParams: [],
valueAtTime: jest.fn(),
extreme: jest.fn(),
compute: jest.fn()
Expand Down

0 comments on commit d3f8a94

Please sign in to comment.