From c7b1c9d89158f829e438dc08462627f55360a4e6 Mon Sep 17 00:00:00 2001 From: Kevin Nowaczyk Date: Thu, 16 May 2024 08:37:57 -0400 Subject: [PATCH] Update building.test.js --- test/building.test.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test/building.test.js b/test/building.test.js index e273d4c..6639e3e 100644 --- a/test/building.test.js +++ b/test/building.test.js @@ -56,10 +56,14 @@ beforeEach(() => { fetch.resetMocks(); }); -test('Test Factory', async() => { - fetch.mockResponseOnce(data); +// test('Test Factory', async() => { + // fetch.mockResponseOnce(data); + // const shape = await Building.create('relation', '4'); + // expect(fetch).toHaveBeenCalledTimes(2); +//}); - const shape = await Building.create('relation', '4'); - - expect(fetch).toHaveBeenCalledTimes(2); -}); + test('Create Nodelist', () => { + let xmlData = new window.DOMParser().parseFromString(data, 'text/xml'); + const list = Building.buildNodeList(xmlData); + expect(lisst.length).toBe(4) + });