From c378ba2c4d445656f251236d5e3db5491e7f6ecb Mon Sep 17 00:00:00 2001 From: Lisa Knox Date: Fri, 19 Jul 2024 14:08:22 -0400 Subject: [PATCH] 21720: * updated collection-service-files-response test Arvados-DCO-1.1-Signed-off-by: Lisa Knox --- ...s => collection-service-files-response.cy.js} | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) rename services/workbench2/src/services/collection-service/{collection-service-files-response.test.ts => collection-service-files-response.cy.js} (90%) diff --git a/services/workbench2/src/services/collection-service/collection-service-files-response.test.ts b/services/workbench2/src/services/collection-service/collection-service-files-response.cy.js similarity index 90% rename from services/workbench2/src/services/collection-service/collection-service-files-response.test.ts rename to services/workbench2/src/services/collection-service/collection-service-files-response.cy.js index aea95b925f..34ac6d3229 100644 --- a/services/workbench2/src/services/collection-service/collection-service-files-response.test.ts +++ b/services/workbench2/src/services/collection-service/collection-service-files-response.cy.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { CollectionFile } from 'models/collection-file'; import { getFileFullPath, extractFilesData } from './collection-service-files-response'; describe('collection-service-files-response', () => { @@ -78,7 +77,16 @@ describe('collection-service-files-response', () => { const result = extractFilesData(xmlDoc); // then - expect(result).toEqual([{ id: `${collUUID}/${expectedName}`, name: expectedName, path: "", size: 3, type: "file", url: `/c=${collUUID}/${expectedURL}` }]); + expect(result).to.deep.equal([ + { + id: `${collUUID}/${expectedName}`, + name: expectedName, + path: "", + size: 3, + type: "file", + url: `/c=${collUUID}/${expectedURL}` + } + ]); }); }); }); @@ -89,13 +97,13 @@ describe('collection-service-files-response', () => { const file = { name: '#test', path: 'http://localhost', - } as CollectionFile; + }; // when const result = getFileFullPath(file); // then - expect(result).toBe('http://localhost/#test'); + expect(result).to.equal('http://localhost/#test'); }); }); -- 2.30.2