Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/sim/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@
"@types/react-dom": "^19",
"@types/ssh2": "^1.15.6",
"@types/yauzl": "3.4.0",
"@useblacksmith/vitest": "0.7.0",
"@vitejs/plugin-react": "^6.2.1",
"@vitest/coverage-v8": "^5.1.0",
"@vitest/expect": "5.1.0",
Expand Down
10 changes: 9 additions & 1 deletion apps/sim/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import path from 'path'
import blacksmith from '@useblacksmith/vitest'
import react from '@vitejs/plugin-react'
import { defineConfig, mergeConfig } from 'vitest/config'
import sharedConfig, { integrationTestConfig } from '../../vitest.shared'
Expand All @@ -19,11 +20,18 @@ export default defineConfig(({ mode }) => {
const integration = mode === 'integration'
const live = mode === 'live'
if (!integration) loadEnvConfig(process.cwd())
/**
* Test selection on trial: in CI the unit run records what each test file loads and logs how
* many files a selecting run would have skipped, while still running every test. Shadow mode
* changes nothing about what runs; selection is a separate decision once the logs show it
* never skips a test a change could break.
*/
const recordTestSelection = mode === 'test' && process.env.GITHUB_ACTIONS === 'true'

return mergeConfig(
integration ? mergeConfig(sharedConfig, integrationTestConfig) : sharedConfig,
{
plugins: [react()],
plugins: [react(), ...(recordTestSelection ? [blacksmith({ shadow: true })] : [])],
/**
* Skip PostCSS entirely. Loading the Tailwind config for a `.module.css`
* import costs ~150ms per test file that reaches an emcn component, and no
Expand Down
47 changes: 47 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading