From b09b15ff26d5cb27c477535a16ddc472b6e2374b Mon Sep 17 00:00:00 2001 From: Aron Date: Fri, 5 Jul 2024 15:33:53 +0800 Subject: [PATCH] Update tests --- packages/runtime/tests/global-extends.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/runtime/tests/global-extends.test.ts b/packages/runtime/tests/global-extends.test.ts index 8cbe22be9..5b6186a73 100644 --- a/packages/runtime/tests/global-extends.test.ts +++ b/packages/runtime/tests/global-extends.test.ts @@ -1,12 +1,12 @@ import { beforeAll, expect, it } from 'vitest' beforeAll(async () => { - window.masterCSSConfigs = [{ + globalThis.masterCSSConfigs = [{ variables: { primary: '#000000' } }] - window.masterCSSConfig = { + globalThis.masterCSSConfig = { extends: [{ variables: { secondary: '#ffffff' @@ -17,8 +17,8 @@ beforeAll(async () => { }) it('should include masterCSSConfigs', () => { - expect(window.masterCSSConfigs).toBeDefined() - expect(window.runtimeCSS.variables.primary).toBeDefined() - expect(window.runtimeCSS.variables.secondary).toBeDefined() - expect(window.runtimeCSS.customConfig.extends?.length).toBe(2) + expect(globalThis.masterCSSConfigs).toBeDefined() + expect(globalThis.runtimeCSS.variables.primary).toBeDefined() + expect(globalThis.runtimeCSS.variables.secondary).toBeDefined() + expect(globalThis.runtimeCSS.customConfig.extends?.length).toBe(2) }) \ No newline at end of file