Skip to content

Commit

Permalink
test: copy test
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Jul 24, 2024
1 parent c2f82f4 commit 0d314c2
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../css.spec'
31 changes: 31 additions & 0 deletions playground/css/vite.config-sass-modern-compiler.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { defineConfig } from 'vite'
import baseConfig from './vite.config.js'

export default defineConfig({
...baseConfig,
css: {
...baseConfig.css,
preprocessorOptions: {
...baseConfig.css.preprocessorOptions,
scss: {
api: 'modern-compiler',
additionalData: `$injectedColor: orange;`,
importers: [
{
canonicalize(url) {
return url === 'virtual-dep'
? new URL('custom-importer:virtual-dep')
: null
},
load() {
return {
contents: ``,
syntax: 'scss',
}
},
},
],
},
},
},
})
2 changes: 1 addition & 1 deletion playground/css/vite.config-sass-modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig({
preprocessorOptions: {
...baseConfig.css.preprocessorOptions,
scss: {
api: 'modern',
api: 'modern-compiler',
additionalData: `$injectedColor: orange;`,
importers: [
{
Expand Down
4 changes: 4 additions & 0 deletions playground/vitestGlobalSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export async function setup({ provide }: GlobalSetupContext): Promise<void> {
path.resolve(tempDir, 'css'),
path.resolve(tempDir, 'css__sass-modern'),
)
await fs.copy(
path.resolve(tempDir, 'css'),
path.resolve(tempDir, 'css__sass-modern-compiler'),
)
}

export async function teardown(): Promise<void> {
Expand Down

0 comments on commit 0d314c2

Please sign in to comment.