@kojiro.ueda/bandia
v0.0.6
Published
Create mock object for Jest.
Downloads
35
Readme
bandia
Create mock object for Jest.
how to use
import { mock } from "@kojiro.ueda/bandia";
class Test {
method1() {
return true;
}
}
describe("test", () => {
it("should mocked", () => {
const instance = mock<Test>();
instance.method1.mockReturnValueOnce(false);
expect(instance.method()).toBe(false);
});
});