Chapter 8: draft code samples

This commit is contained in:
Beth Griggs
2020-07-01 03:17:32 +01:00
parent b54b35efb5
commit d918785e10
23 changed files with 5804 additions and 487 deletions
+10
View File
@@ -0,0 +1,10 @@
let uppercase = require("./../uppercase");
describe("uppercase", () => {
test("uppercase hello returns HELLO", () => {
uppercase = jest.fn(() => "HELLO");
const result = uppercase("hello");
expect(uppercase).toHaveBeenCalledWith("hello");
expect(result).toBe("HELLO");
});
});