Skip to content

Commit fea1302

Browse files
committed
test: updated process-css.spec.ts
1 parent b94d406 commit fea1302

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/core/css/__test__/process-css.spec.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { resolve } from 'path'
22
import { describe, expect, test, vi } from 'vitest'
3+
import { transformSymbol } from '@unplugin-vue-cssvars/utils'
34
import { createCSSModule, getCSSFileRecursion } from '../process-css'
45
import type { ICSSFile } from '../../types'
56
describe('process css', () => {
@@ -107,7 +108,7 @@ describe('process css', () => {
107108
foo: new Set(['v-bind(foo)']),
108109
},
109110
}
110-
mockCssFiles.set(resolve('/play/src/assets/test.css'), mockCSSFilesContent)
111+
mockCssFiles.set(transformSymbol(resolve('/play/src/assets/test.css')), mockCSSFilesContent)
111112
const mockDescriptor = {
112113
styles: [{
113114
content: '@import "./assets/test";\n'
@@ -116,7 +117,7 @@ describe('process css', () => {
116117
+ ' }',
117118
}],
118119
}
119-
const mockId = resolve('/play/src/App.vue')
120+
const mockId = transformSymbol(resolve('/play/src/App.vue'))
120121
const res = createCSSModule(mockDescriptor as any, mockId, mockCssFiles)
121122
expect(res).toMatchObject([mockCSSFilesContent])
122123
expect(res).matchSnapshot()
@@ -130,14 +131,14 @@ describe('process css', () => {
130131
foo: new Set(['v-bind(foo)']),
131132
},
132133
}
133-
mockCssFiles.set(resolve('/play/src/assets/test.css'), mockCSSFilesContent)
134+
mockCssFiles.set(transformSymbol(resolve('/play/src/assets/test.css')), mockCSSFilesContent)
134135
const mockCSSFilesContent2 = {
135136
importer: new Set(),
136137
vBindCode: {
137138
bar: new Set(['v-bind(bar)']),
138139
},
139140
}
140-
mockCssFiles.set(resolve('/play/src/assets/test2.css'), mockCSSFilesContent2)
141+
mockCssFiles.set(transformSymbol(resolve('/play/src/assets/test2.css')), mockCSSFilesContent2)
141142
const mockDescriptor = {
142143
styles: [{
143144
content: '@import "./assets/test";\n'

0 commit comments

Comments
 (0)