Skip to content

Commit

Permalink
chore: Limit tests concurrency (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
just-boris authored Jun 17, 2024
1 parent bd16005 commit 4a25a08
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import { defineConfig } from 'vitest/config';
import os from 'node:os';

export default defineConfig({
test: {
environment: 'node',
globalSetup: './test/utils/global-setup.ts',
testTimeout: 15000,
poolOptions: {
threads: {
minThreads: 1,
// leave half of CPU capacity for Chrome browser processes
maxThreads: Math.max(Math.floor(os.cpus().length / 2), 1),
},
},
coverage: {
enabled: process.env.CI === 'true',
provider: 'istanbul',
Expand Down

0 comments on commit 4a25a08

Please sign in to comment.