Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
interim17 committed Sep 22, 2023
1 parent 1531bf2 commit 33afb92
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/test/SelectionInterface.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ const idMapping = {
};

const color = "";
const initialColorChanges = {
agents: [],
color,
};
const initialColorChanges = [
{
agents: [],
color,
},
];

describe("SelectionInterface module", () => {
describe("decode", () => {
Expand Down Expand Up @@ -427,9 +429,10 @@ describe("SelectionInterface module", () => {
};
const si = new SelectionInterface();
si.parse(idMapping);
const uiDisplayData = si.getUIDisplayData();
const oldColors = si.getColorsForName("A");
expect(oldColors).not.toContain(newColor);
si.updateAgentColors(agentIds, colorChanges);
si.updateAgentColors(agentIds, colorChanges, uiDisplayData);
const colors = si.getColorsForName("A");
expect(colors).toContain(newColor);
});
Expand Down

0 comments on commit 33afb92

Please sign in to comment.