Errata: June 29, 2020

Thank you for purchasing Testing Vue.js Applications. You can report errors not listed below in the LiveBook Errata thread. We'll update this list as necessary. Thank you!



Page 24, Section 2.1.5

The serve script is incorrect. Instead of:

"serve": "npm run build && node scripts/serve"

It should be:

"serve": "vue-cli-service serve"

Page 26, Section 2.2.1

Jest should be pinned at v23.6.0. Instead of:

npm install --save-dev jest

Use:

npm install --save-dev jest@23.6.0

Page 32, Listing 2.4

There is a missing closing parenthesis. It should be:


      describe('Item.vue', () => {
        test('sanity test', () => {
          expect(true).toBe(true)
        })
      })
    

Page 34, Section 2.2.6

Babel-jest and vue-jest should be pinned. Instead of:

npm install --save-dev babel-jest vue-jest

Use:

npm install --save-dev babel-jest@23.6.0 vue-jest@2.6.0

Page 37, Section 2.3.1

@vue/test-utils should be pinned. Instead of:

npm install --save-dev @vue/test-utils

Use:

npm install --save-dev @vue/test-utils@1.0.0-beta.20

Page 55, Section 3.5.1

Wrapper is misspelled. Instead of:

wrappr

It should be:

wrapper

Page 91, Listing 5.2

The listing is missing an opening curly brace. The listing should be:

test('calls onClose when button is clicked', () => {
  const onClose = jest.fn()
  const wrapper = shallowMount(Modal, {
    propsData: {
      onClose
    }
  })
  wrapper.find('button').trigger('click')
  expect(onClose).toHaveBeenCalled()
})