From 803c922bc27326fa196a942e4e9e139a1f409eb1 Mon Sep 17 00:00:00 2001 From: Ido Rosenthal Date: Mon, 18 Mar 2024 17:05:28 +0200 Subject: [PATCH] fix: tests --- packages/core/test/helpers/namespace.spec.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/core/test/helpers/namespace.spec.ts b/packages/core/test/helpers/namespace.spec.ts index 923156ee7..be593a728 100644 --- a/packages/core/test/helpers/namespace.spec.ts +++ b/packages/core/test/helpers/namespace.spec.ts @@ -119,7 +119,12 @@ describe('createNamespaceStrategy', () => { it('should throw when no unique namespace can be generated and hash slice size is larger then hash length', () => { function getErrorMessage() { try { - defaultNoMatchHandler(false, 'x-1', '/package/x2.st.css', '/package/x1.st.css'); + defaultNoMatchHandler( + false, + 'x-1', + '/package/x2.st.css', + new Map([['x-1', '/package/x1.st.css']]) + ); } catch (e) { return (e as Error).message; } @@ -140,7 +145,12 @@ describe('createNamespaceStrategy', () => { it('should throw when no unique namespace can be generated in strict mode', () => { function getErrorMessage() { try { - defaultNoMatchHandler(true, 'x', '/package/x1.st.css', '/package/x.st.css'); + defaultNoMatchHandler( + true, + 'x', + '/package/x1.st.css', + new Map([['x', '/package/x.st.css']]) + ); } catch (e) { return (e as Error).message; }