-
Notifications
You must be signed in to change notification settings - Fork 1
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
Create tests in Insomnia #108
Conversation
cloudjumpercat
commented
Sep 26, 2024
- how to page covering how to create tests in Insomnia
Signed-off-by: Diana <[email protected]>
✅ Deploy Preview for kongdeveloper ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Signed-off-by: Diana <[email protected]>
…pages to the tests landing page Signed-off-by: Diana <[email protected]>
```javascript | ||
const response1 = await insomnia.send(); | ||
const body = JSON.parse(response1.data); | ||
expect(body).to.have.property('meal_options'); | ||
expect(body.meal_options).to.be.an('array'); | ||
expect(body).to.be.an('object'); | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for reviewers: This was created with ChatGPT. Although the test passes, I don't fully trust it or understand it. Is meal_options
really nested? Is this really testing the right thing?
Also, my gut is telling me that some of these lines might be extraneous/unnecessary.
```javascript | ||
const response1 = await insomnia.send(); | ||
const body = JSON.parse(response1.data); | ||
expect(body).to.be.an('object'); | ||
expect(body).to.have.property('meal_options'); | ||
expect(body.meal_options).to.be.an('array'); | ||
if (body.meal_options.length > 0) { | ||
expect(body.meal_options[0]).to.be.a('string'); | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for reviewers: This was created with ChatGPT. Although the test passes, I don't fully trust it or understand it. Is meal_options
really nested? Is this really testing the right thing?
Also, my gut is telling me that some of these lines might be extraneous/unnecessary.