Skip to content

Commit 2e484db

Browse files
authored
Update gabledroofbug.test.js
1 parent ec8eb3b commit 2e484db

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

test/gabledroofbug.test.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,19 @@ const data = `<?xml version='1.0' encoding='UTF-8'?>
3434
</way>
3535
</osm>`;
3636

37-
let accessCount = 0;
38-
39-
const mockResponse = {
40-
ok: true,
41-
status: 200,
42-
text: jest.fn().mockResolvedValue(data),
43-
};
44-
global.fetch = jest.fn().mockResolvedValue(mockResponse);
45-
4637
beforeEach(() => {
38+
fetchMock.resetMocks();
4739
errors = [];
4840
});
4941

5042
test ('', () => {
5143
Building.downloadDataAroundBuilding('way', '31361386');
5244
});
5345

54-
test('Constructor', () => {
46+
test('Factory', () => {
47+
fetch.mockResponses(
48+
[data],
49+
);
5550
const bldg = new Building('31361386', data);
5651
expect(bldg.parts.length).toBe(1);
5752
const part = bldg.parts[0];

0 commit comments

Comments
 (0)