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

exists() requires a message or else QUnit complains #127

Open
DesignByOnyx opened this issue Aug 13, 2015 · 2 comments
Open

exists() requires a message or else QUnit complains #127

DesignByOnyx opened this issue Aug 13, 2015 · 2 comments
Labels

Comments

@DesignByOnyx
Copy link

If exists() is the only test which runs and a message is omitted, QUnit will complain that at least 1 assertion was expected.

QUnit.test("The input exists", function () {
    F("input").exists();
});

The following will report that 1 assertion was successful:

QUnit.test("The input exists", function () {
    F("input").exists('The input exists');
});
@matthewp
Copy link
Contributor

This is by design. Some times you need to use things like .exists() for control-flow, adding a message is how you tell FuncUnit that this .exists() is an assertion.

@daffl
Copy link
Contributor

daffl commented Aug 13, 2015

It is documented as optional parameters though.

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

No branches or pull requests

4 participants