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

contributing.md instructions for creating tests #88

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

tukib
Copy link
Member

@tukib tukib commented Dec 18, 2023

friendlier instructions for creating tests, with links to Jest documentation.

Comment on lines +43 to +46
expect(log2(0)).toThrow();
expect(log2(-1)).toThrow();
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't catch the throw unless you wrap the code to test in a function:

Suggested change
expect(log2(0)).toThrow();
expect(log2(-1)).toThrow();
expect(() => log2(0)).toThrow();
expect(() => log2(-1)).toThrow();

(I know this is just example code, but still.)

@seanmakesgames
Copy link
Member

seanmakesgames commented Jan 16, 2024

@Fayti1703 @oolu4236 @ellipsisasterisk and I checked this out on codespaces and also updated the branch to remove conflicts.

The changes to the jest config file did not break pnpm test

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

Successfully merging this pull request may close these issues.

3 participants