We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a937158 commit 5e9e908Copy full SHA for 5e9e908
src/api.test.js
@@ -2,12 +2,13 @@ import source from "../db.json";
2
import { getUser } from "./api";
3
var nock = require("nock");
4
describe("getUser()", function() {
5
- it("getUser('AgileTest')", async function() {
6
- nock("http://localhost:5000")
7
- .defaultReplyHeaders({ "access-control-allow-origin": "*" })
8
- .get("/AgileTest")
9
- .reply(200, source);
+ nock("http://localhost:5000")
+ .defaultReplyHeaders({ "access-control-allow-origin": "*" })
+ .get("/AgileTest")
+ .reply(200, source);
+ it("getUser('AgileTest') should return db.json", async function() {
10
const res = await getUser("AgileTest");
11
expect(res).toEqual(source);
12
+ expect(res.name).toEqual(source.name);
13
});
14
0 commit comments