mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
* feat: benchmark * feat: console result * chore: lockfile * chore: rebase * chore: lock.yaml * chore: pnpm lock yaml * chore: update * feat: collect benchmark * chore: benchmark use suite collect bench * chore: run * chore: lock.yaml? * feat: render * chore: revert lock.yml * chore: update * feat: options.reports * chore: update * chore: async * chore: defer * chore: add options * feat: warn * chore: update * feat: sort render * chore: update * chore: pnpm lock * fix: import * fix: types * fix: types * chore: build location * fix: lint * fix: lint * feat: tinybench@2.1.3 * chore: update lock * chore: reduce benchmark test time * fix: render * chore: rename * feat: dynamic import tinybench * chore: update * chore: update sort rules * feat: bench test * chore: update test * chore: update * feat!: run mode * feat: throw error on wrong mode * chore: lint * chore: cleanup * chore: update output * chore: remove options.benchmark is not used in viteConfig.test when command is not benchmark * chore: update ops/sec * feat: json reporter * chore: ignore sample output on terminal * chore: update * chore: update * fix: actually run tests Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com> Co-authored-by: Vladimir Sheremet <sleuths.slews0s@icloud.com>
28 lines
722 B
JavaScript
28 lines
722 B
JavaScript
import { startVitest } from 'vitest/node'
|
|
|
|
const configs = [
|
|
['test/default-css', {}],
|
|
['test/process-css', { include: [/App\.css/] }],
|
|
['test/process-module', { include: [/App\.module\.css/] }],
|
|
['test/scope-module', { include: [/App\.module\.css/], modules: { classNameStrategy: 'scoped' } }],
|
|
['test/non-scope-module', { include: [/App\.module\.css/], modules: { classNameStrategy: 'non-scoped' } }],
|
|
]
|
|
|
|
async function runTests() {
|
|
for (const [name, config] of configs) {
|
|
const success = await startVitest('test', [name], {
|
|
run: true,
|
|
css: config,
|
|
update: false,
|
|
teardownTimeout: 1000_000_000,
|
|
})
|
|
|
|
if (!success)
|
|
process.exit(1)
|
|
}
|
|
|
|
process.exit(0)
|
|
}
|
|
|
|
runTests()
|