Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Setup tests #166

Closed
wants to merge 2 commits into from
Closed

Setup tests #166

wants to merge 2 commits into from

Conversation

baristaGeek
Copy link
Collaborator

Please take a look at how I've set up the environment for running test (use npm test, to test it)

If it looks good, I'll go ahead and write tests for all routes.

@vercel
Copy link

vercel bot commented Apr 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
watermelon ❌ Failed (Inspect) Apr 13, 2023 7:26pm

@github-actions
Copy link

Context by Watermelon

GitHub PRs

No results found :(

Jira Tickets

No results found :(

Slack Threads

No results found :(

@github-actions
Copy link

Context by Watermelon

GitHub PRs

No results found :(

Jira Tickets

No results found :(

Slack Threads

No results found :(

const sampleReq = {
body: {
dailyStats: [
/*... your sample data with at least 10 items ...*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks chatGPT

});

describe("handler", () => {
const mockCreate = jest.fn();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I worry about using mocks due to the speed our API and requirements are changing


const expectedRecords = [
{
fields: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it?

@EstebanDalelR
Copy link
Member

Please add husky

@baristaGeek
Copy link
Collaborator Author

Closing in favor of the new tests

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

Successfully merging this pull request may close these issues.

None yet

2 participants