Giter Club home page Giter Club logo

Comments (6)

kentcdodds avatar kentcdodds commented on June 10, 2024

Interesting! Thank you for digging into this!

So yeah, this is a bit of a bummer. The correct fix is simple, but will require a slightly different approach to the test. Here's the fix:

- finishDate = faker.date.between(startDate, new Date()).getTime(),
+ finishDate = faker.date.between(new Date(startDate), new Date()).getTime(),

The problem is this will require changing the test a bit which would require I re-record the video. Not a huge deal, but a bit of a bummer.

from bookshelf.

kentcdodds avatar kentcdodds commented on June 10, 2024

Here's the update that I think should be made to the test for this:

+ const user = await loginAsUser()
+ const book = await booksDB.create(buildBook())
+ const listItem = await listItemsDB.create(
+   buildListItem({owner: user, book, finishDate: null}),
+ )
+ await renderBookScreen({user, book, listItem})
+
- const {listItem} = await renderBookScreen()
-
- // set the listItem to be unread in the DB
- await listItemsDB.update(listItem.id, {finishDate: null})

I'm going to give this some thought. I think I'll need to rerecord the video before I make these changes.

Thanks again for reporting this!

from bookshelf.

kentcdodds avatar kentcdodds commented on June 10, 2024

@all-contributors please add @milamer for bugs

from bookshelf.

allcontributors avatar allcontributors commented on June 10, 2024

@kentcdodds

I've put up a pull request to add @milamer! 🎉

from bookshelf.

kentcdodds avatar kentcdodds commented on June 10, 2024

I've updated the main branch to have this correction. An update to the exercise will come in the future.

from bookshelf.

kentcdodds avatar kentcdodds commented on June 10, 2024

The video that needs an update is this one: https://epicreact.dev/modules/build-an-epic-react-app/integration-testing-extra-credit-solution-06

It's a relief that only one video is impacted, but a bummer that it's one of the longer ones 😅 I'll put this on my list though. Thanks again!

from bookshelf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.