Disable safeDescriptors for mobx in test because we need to use jest.spyOn

Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
This commit is contained in:
Hung-Han (Henry) Chen committed 2021-10-04 15:18:10 +03:00
1 parent 21272f790e
commit 0f63ccbb82
1 file changed
+7
+7
View File
@@ -21,10 +21,17 @@
import fetchMock from "jest-fetch-mock";
import configurePackages from "./common/configure-packages";
import { configure } from "mobx";
// setup default configuration for external npm-packages
configurePackages();
configure({
// Needed because we want to use jest.spyOn()
// ref https://github.com/mobxjs/mobx/issues/2784
safeDescriptors: false,
});
// rewire global.fetch to call 'fetchMock'
fetchMock.enableMocks();