Untitled
unknown
plain_text
a year ago
566 B
10
Indexable
w testach dostaje błąd na:
jest.mock("@logic/ajax", () => {
return {
...jest.requireActual("@logic/ajax"),
useAjax: () => {
return {
get: getMock,
};
},
};
});
Error: Spread types may only be created from object types.
ale już
jest.mock("@logic/ajax", () => {
const acutal =jest.requireActual("@logic/ajax"),
return {
...actual,
useAjax: () => {
return {
get: getMock,
};
},
};
});
działa poprawnie, czemu?Editor is loading...
Leave a Comment