Skip to content

Commit

Permalink
configure vitest so that vitest can run before build
Browse files Browse the repository at this point in the history
  • Loading branch information
uenoB committed Jul 20, 2024
1 parent 4070a53 commit d21032d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
- run: pnpm tsc
- run: pnpm eslint .
- run: pnpm stylelint .
- run: pnpm build
- run: pnpm vitest run
- run: pnpm build
- run: pnpm --recursive --sequential run build
release:
needs: check
Expand Down
16 changes: 16 additions & 0 deletions vitest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import * as url from 'node:url'
import * as path from 'node:path'
import { defineConfig } from 'vitest/config'

const rootDir = url.fileURLToPath(new URL('.', import.meta.url))

export default defineConfig({
test: {
alias: [
{
find: /^@minissg\/([^/]+)$/,
replacement: path.join(rootDir, 'packages', '$1', 'src')
}
]
}
})

0 comments on commit d21032d

Please sign in to comment.