Skip to content

Commit

Permalink
chore: test pass
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jun 10, 2022
1 parent 22c457f commit 5bee34c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/compiler-sfc/test/compileStyle.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test('preprocess scss', () => {
const style = parse({
source:
'<style lang="scss">\n' +
'$red: rgb(255, 0, 0);\n' +
'$red: red;\n' +
'.color { color: $red; }\n' +
'</style>\n',
filename: 'example.vue',
Expand All @@ -46,15 +46,15 @@ test('preprocess scss', () => {
})

expect(result.errors.length).toBe(0)
expect(result.code).toEqual(expect.stringContaining('color: red;'))
expect(result.code).toMatch('color: red;')
expect(result.map).toBeTruthy()
})

test('preprocess sass', () => {
const style = parse({
source:
'<style lang="sass">\n' +
'$red: rgb(255, 0, 0)\n' +
'$red: red\n' +
'.color\n' +
' color: $red\n' +
'</style>\n',
Expand All @@ -71,7 +71,7 @@ test('preprocess sass', () => {
})

expect(result.errors.length).toBe(0)
expect(result.code).toEqual(expect.stringContaining('color: red;'))
expect(result.code).toMatch('color: red;')
expect(result.map).toBeTruthy()
})

Expand Down

0 comments on commit 5bee34c

Please sign in to comment.