Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skipping all describe section with benchmarks still failing in non benchmarks mode #6899

Open
6 tasks done
mskonovalov opened this issue Nov 12, 2024 · 1 comment
Open
6 tasks done

Comments

@mskonovalov
Copy link

Describe the bug

describe.skipIf(skipBenchmarks)('performance', () => {
  bench('100 items should take not long', () => {

Produces error
Error: bench() is only available in benchmark mode.

Reproduction

const skipBenchmarks =
  !process.env.SKIP_BENCHMARKS || process.env.SKIP_BENCHMARKS !== 'false';

console.log(skipBenchmarks); // prints true

describe.skipIf(skipBenchmarks)('performance', () => {
  bench('100 items should take not long', () => {
    console.log('benchmark');
  });
});
  

### System Info

```shell
Linux, Ubuntu 20.04
vitest 2.1.1
node 20.17

Used Package Manager

yarn

Validations

@mskonovalov
Copy link
Author

actually it seems that skipping all individual benchmarks does not work either, and it seems the only option is to move it in a separate file :(((

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant