Skip to content

Commit 84392ff

Browse files
authored
Create display.test.js
1 parent 6f7eab8 commit 84392ff

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

tests/display.test.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// https://www.codegrepper.com/code-examples/javascript/jest+test+if+method+exists
2+
3+
4+
describe('', () => {
5+
test('', () => {
6+
7+
});
8+
});
9+
10+
11+
12+
// jest.mock("../foo");
13+
// const foo = require("../foo");
14+
15+
// test('make sure foo is called', () => {
16+
// expect(foo).toBeCalled();
17+
// });
18+
// test('make sure foo run only once', () => {
19+
// expect(foo.mock.calls.length).toBe(1);
20+
// });
21+
22+
23+
// jest.mock("../foo");
24+
// jest.mock("../bar");
25+
26+
// const foo = require("../foo");
27+
// const bar = require("../bar");
28+
29+
// test("functions are called", done => {
30+
// require("../index");
31+
// expect(foo.mock.calls.length).toBe(1);
32+
// expect(bar.mock.calls.length).toBe(1);
33+
// done();
34+
// });

0 commit comments

Comments
 (0)