Thanks to visit codestin.com
Credit goes to github.com

Skip to content

More automated tests#152

Merged
Uzlopak merged 6 commits into
fastify:masterfrom
puskin:126-automated-tests
May 2, 2024
Merged

More automated tests#152
Uzlopak merged 6 commits into
fastify:masterfrom
puskin:126-automated-tests

Conversation

@puskin

@puskin puskin commented Apr 19, 2024

Copy link
Copy Markdown
Contributor

Added more automated tests, chipping in for the 100% test coverage goal mentioned in here

I really don't know the project, if not for what I studied while writing tests, so I picked the least complicated route and wrote a couple of automated tests of "well exposed" functions and methods

@gurgunday gurgunday left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@Uzlopak Uzlopak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

basename.test.js should cover all branches
busboy-emit.test.js should check if the first call to busboy.emit('finish') returns anything
dicer-write.test.js does not test what it claims

@puskin

puskin commented Apr 19, 2024

Copy link
Copy Markdown
Contributor Author

busboy-emit.test.js should check if the first call to busboy.emit('finish') returns anything

@Uzlopak am I reading the code wrong, or Busyboy.emit will never return anything?

Comment thread test/dicer-write.test.js Outdated
})
})

t.end()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Basically not testing anything, because you call t.end(). use t.plan for this subtest also.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Uzlopak oh, good to know! First time using this testing framework!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove the t.end() please

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Uzlopak is there anything else for me to do in this PR?

@gurgunday gurgunday requested a review from Uzlopak April 19, 2024 19:45
@Uzlopak Uzlopak merged commit e62384c into fastify:master May 2, 2024
@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 1, 2026
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.

3 participants