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

Noir ignores a test when test header is malformed #4676

Closed
LogvinovLeon opened this issue Mar 29, 2024 · 0 comments · Fixed by #6414
Closed

Noir ignores a test when test header is malformed #4676

LogvinovLeon opened this issue Mar 29, 2024 · 0 comments · Fixed by #6414
Labels
bug Something isn't working

Comments

@LogvinovLeon
Copy link
Contributor

Aim

I'm writing tests and I accidentally used this syntax:

#[test(should_fail_with("Arrays not equal"))]

instead of correct one:

#[test(should_fail_with = "Arrays not equal")]

Expected Behavior

I expect Noir to throw a compilation error

Bug

Test gets silently ignored. Which is very dangerous on code review as reviewer would think that this case is tested and works as the first syntax looks plausible

To Reproduce

  1. Write the test using the first syntax
  2. Run tests. It's ignored

Project Impact

Blocker

Impact Context

It's not a blocker, but I think it's high as it can allow for some critical vulnerabilities to go unnoticed

Workaround

Yes

Workaround Description

Use correct syntax, have linter ish script that checks for incorrect one

Additional Context

No response

Installation Method

Binary (noirup default)

Nargo Version

noirc version = 0.26.0+c46b164ce56e6a8f81255fb17eb6539bd040f336

NoirJS Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@LogvinovLeon LogvinovLeon added the bug Something isn't working label Mar 29, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Mar 29, 2024
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant