Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaLRussell committed Jul 1, 2024
1 parent 1872477 commit 6d58e14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/static/src/app/components/mixins/selectVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default (

const updateSelectedVariables = (graphIdx: number, newVariables: string[]) => {
store.dispatch(`graphs/${GraphsAction.UpdateSelectedVariables}`, {
graphIdx,
graphIndex: graphIdx,
selectedVariables: newVariables
});
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
// Mock the fadeColor util which uses color package, which doesn't play nicely with jest
import Vuex from "vuex";
import { shallowMount } from "@vue/test-utils";
import { BasicState } from "../../../../src/app/store/basic/state";
import { GraphsAction } from "../../../../src/app/store/graphs/actions";
import HiddenVariables from "../../../../src/app/components/graphConfig/HiddenVariables.vue";
import { GraphsGetter } from "../../../../src/app/store/graphs/getters";

function mockfun() {
return "Hello";
}
// Mock the fadeColor util which uses color package, which doesn't play nicely with jest
jest.mock("../../../../src/app/components/graphConfig/utils", () => {
return {
fadeColor: (input: string) => {
console.log(`calling fade w ${input}`);
const match = input.match(/rgb\(([0-9]*), ([0-9]*), ([0-9]*)\)/);
const result = `rgba(${match![1]}, ${match![2]}, ${match![3]}, 0.5)`;
console.log(result);
return result;
}
};
Expand Down

0 comments on commit 6d58e14

Please sign in to comment.