Skip to content

Conversation

@NARUDESIGNS
Copy link
Collaborator

@jywarren I've been able to convert history_spec.js jasmine file to jest but with two exceptions. These exceptions occurred because the expect blocks were put in a loop and so the expected result was inconsistent. So instead of testing for every loop iteration, I simply tested after the loop was run

// checked for the length instead of individual value in the loop, hence the below test wasn't added
expect( await page.evaluate(() => editor.history.log[editor.history.log.length - 1].text) ).toBe("some text " + i);

And then

// commented out this line because the value of i available to it is 0 which is inconsistent
expect(await page.evaluate(() => $('#history p.log:last .preview').html())).toBe("some text " + i + "...");

@gitpod-io
Copy link

gitpod-io bot commented Jan 27, 2022

@NARUDESIGNS NARUDESIGNS requested a review from jywarren January 27, 2022 16:44
@jywarren
Copy link
Member

This looks great, can you resolve the conflicts and then we can merge! ✨

@NARUDESIGNS
Copy link
Collaborator Author

NARUDESIGNS commented Jan 27, 2022

Hi, @jywarren I've resolved the conflict and removed the equivalent jasmine file as well. Please review again.
Thank you very much.

@jywarren jywarren merged commit 08919b9 into main Jan 28, 2022
@jywarren
Copy link
Member

Awesome work here!

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