Skip to content

Commit

Permalink
Fixed test to match new jest version
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlytoc committed Apr 7, 2024
1 parent 28fae12 commit 9d18924
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion exercises/05-adding-styles/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ test("ReactDOM needs to be called once", () => {

test("The component Badge should return the exact HTML", () => {
const tree = renderer.create(ReactDOM.render.mock.calls[0][0]).toJSON();
// throw tree
expect(tree).toMatchInlineSnapshot(`
<button
className="btn btn-primary"
style={
Object {
{
"background": "black",
"border": "1px solid yellow",
"fontSize": "16px",
Expand Down
4 changes: 2 additions & 2 deletions exercises/05.1-second-styles/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test("The component Badge should return the exact HTML", () => {
<button
className="btn btn-primary"
style={
Object {
{
"background": "yellow",
"border": "none",
"color": "black",
Expand All @@ -27,7 +27,7 @@ test("The component Badge should return the exact HTML", () => {
<span
className="badge badge-light"
style={
Object {
{
"background": "red",
"borderRadius": "50%",
}
Expand Down

0 comments on commit 9d18924

Please sign in to comment.