Skip to content

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
Contributor

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.

4 participants