May 2019
Intermediate to advanced
496 pages
10h 38m
English
In Chapter 2, Test-driving Data Input with React, we wrote some tests that didn't use the normal Arrange-Act-Assert test format. Here's a reminder of how one of those tests looked, from the CustomerForm test suite:
it('saves existing value when submitted', async () => { expect.hasAssertions(); render( <CustomerForm firstName="Ashley" onSubmit={customer => expect(customer.firstName).toEqual('Ashley') ...Read now
Unlock full access