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

sTest: add toThrow, allow multiple expect clauses in one test #3392

Open
OAGr opened this issue Sep 29, 2024 · 0 comments
Open

sTest: add toThrow, allow multiple expect clauses in one test #3392

OAGr opened this issue Sep 29, 2024 · 0 comments
Labels
SquiggleHub Libraries Code written in Squiggle, on Squiggle Hub

Comments

@OAGr
Copy link
Contributor

OAGr commented Sep 29, 2024

Description of suggestion or shortcoming:

Claude and such keep on trying to do this:


@name("Test Cost Calculation Function")
testCostCalculationFn = sTest.test(
  "costCalculationFn handles invalid inputs",
  {
    ||
    sTest.expect(costCalculationFn(0, 35000, 3.5, 100, 5)).toThrow()
    sTest.expect(costCalculationFn(20000, 35000, -1, 100, 5)).toThrow()
  }
)

Note that it both has toThrow() and the rest of it.

Requires: #3395

@OAGr OAGr added the SquiggleHub Libraries Code written in Squiggle, on Squiggle Hub label Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SquiggleHub Libraries Code written in Squiggle, on Squiggle Hub
Projects
Status: 🆕 To prioritize
Development

No branches or pull requests

1 participant