diff --git a/packages/compiler-sfc/__tests__/compileStyle.spec.ts b/packages/compiler-sfc/__tests__/compileStyle.spec.ts index b1bd2ee0..d21b99ad 100644 --- a/packages/compiler-sfc/__tests__/compileStyle.spec.ts +++ b/packages/compiler-sfc/__tests__/compileStyle.spec.ts @@ -1,15 +1,23 @@ -import { compileStyle, compileStyleAsync } from '../src/compileStyle' +import { + compileStyle, + compileStyleAsync, + SFCStyleCompileOptions +} from '../src/compileStyle' import { mockWarn } from '@vue/shared' describe('SFC scoped CSS', () => { mockWarn() - function compileScoped(source: string): string { + function compileScoped( + source: string, + options?: Partial + ): string { const res = compileStyle({ source, filename: 'test.css', id: 'test', - scoped: true + scoped: true, + ...options }) if (res.errors.length) { res.errors.forEach(err => { @@ -254,10 +262,15 @@ describe('SFC scoped CSS', () => { describe('