We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec8eb3b commit 2e484dbCopy full SHA for 2e484db
test/gabledroofbug.test.js
@@ -34,24 +34,19 @@ const data = `<?xml version='1.0' encoding='UTF-8'?>
34
</way>
35
</osm>`;
36
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
46
beforeEach(() => {
+ fetchMock.resetMocks();
47
errors = [];
48
});
49
50
test ('', () => {
51
Building.downloadDataAroundBuilding('way', '31361386');
52
53
54
-test('Constructor', () => {
+test('Factory', () => {
+ fetch.mockResponses(
+ [data],
+ );
55
const bldg = new Building('31361386', data);
56
expect(bldg.parts.length).toBe(1);
57
const part = bldg.parts[0];
0 commit comments