This repository was archived by the owner on Oct 21, 2024. It is now read-only.
Next js migration#224
Open
erhaneth wants to merge 4 commits into8by8-org:next-js-migrationfrom
Open
Conversation
Member
|
Hey Huseyin, great job on your first pr. I saw your having trouble with getting the tests to 100%; I was also having trouble with that. I saw that you need to write a test for line 92 for challenger-welcome.tsx. You code try writing a test similar to this: it("Displays the inviter's name when inviterInfo is not null.", async () => {
const inviter = Builder<Inviter>().name('Test Name').build();
const inviterCtxValue = Builder<InviterContextType>().inviterInfo(inviter).build();
render(
<InviterContext.Provider value={inviterCtxValue}>
<PlayerWelcome />
</InviterContext.Provider>
);
const greeting = screen.queryByText(new RegExp(`${inviter.name}'s 8by8 Challenge!`));
expect(greeting).toBeInTheDocument();
const content = screen.queryByText(new RegExp(`Help ${inviter.name} win their`));
expect(content).toBeInTheDocument();
});This is from the file playerwelcome.spec.tsx in my latest pr #225. Let me know if you need help. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Create challenger welcome component and partner context.
Test Plan
Tested challenger welcome render functionality and completed unit test for challenger welcome and partner context
Follow ups