Skip to content

Commit

Permalink
Drop console errors and warnings around NodeOutput.test.ts.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Nov 19, 2024
1 parent 27d534f commit eeb43fa
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
3 changes: 3 additions & 0 deletions client/src/components/Workflow/Editor/NodeOutput.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ function propsForStep(step: Step) {
scroll: { x: ref(0), y: ref(0) },
scale: 1,
datatypesMapper: testDatatypesMapper,
parentNode: null,
readonly: true,
blank: false,
};
}

Expand Down
15 changes: 15 additions & 0 deletions client/src/composables/useMagicKeys.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Vue from "vue";

Check failure on line 1 in client/src/composables/useMagicKeys.js

View workflow job for this annotation

GitHub Actions / client-unit-test (18)

Run autofix to sort these imports!
import { useMagicKeys as wrappedUseMagicKeys } from "@vueuse/core";

export function useMagicKeys() {
// a version of useMagicKeys from vueuse/core that doesn't console.error the
// the message [Vue warn]: Vue 2 does not support reactive collection types such as Map or Set.
// in all our tests. This can be dropped after the migration to Vue3.
const oldSlientConfig = Vue.config.silent;
try {
Vue.config.silent = true;
return wrappedUseMagicKeys();
} finally {
Vue.config.silent = oldSlientConfig;
}
}
2 changes: 1 addition & 1 deletion client/src/stores/workflowEditorToolbarStore.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useMagicKeys } from "@vueuse/core";
import { computed, onScopeDispose, reactive, ref, watch } from "vue";

import { type Rectangle } from "@/components/Workflow/Editor/modules/geometry";
import { useMagicKeys } from "@/composables/useMagicKeys";
import { useUserLocalStorage } from "@/composables/userLocalStorage";

import { defineScopedStore } from "./scopedStore";
Expand Down

0 comments on commit eeb43fa

Please sign in to comment.