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 current test? #235

Open
b1ek opened this issue Jul 1, 2023 · 1 comment
Open

Skipping current test? #235

b1ek opened this issue Jul 1, 2023 · 1 comment

Comments

@b1ek
Copy link

b1ek commented Jul 1, 2023

Let's say I have a test like this:

import { suite } from 'uvu';
import { getUserConsent } from './some-file.js';

const sum = suite('Tests');

sum('An interactive test', () => {
    if (!getUserConsent()) {
        // Test can't be run: it requires
        // user consent but there isnt
    }
})

I don't want to throw Error('Can\'t run this test'), since the test didn't fail: it simply can't be run. I know that there is a sum.skip(...) method but it seems to be designed to skip an upcoming test, not the current one.

@UnderKoen
Copy link

In mocha it is possible to use this.skip(). Would be an awesome addition!

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

No branches or pull requests

2 participants