Courses
Vue Foundations Vue Fullstack Vue Enterprise
Articles
Latest Topics
More
Newsletter Sponsorship Discord About
The video for this lesson is currently being updated, please read the transcript instead.
Full-Stack Vue + Node > Lesson 25

Assertions and Asynchronous Test Cases

In the last video, we set up a Mocha unit test and got it running. The thing is it doesn't actually test anything, yet.

To help us make some tests, we'll now add an assertion library called expect. Let's first install it:

$ npm i -D expect@23

With that installed, let's now require it at the top of the test file:

tests/unit/server/item.test.js

const expect = require("expect");

Using an assertion


Back to course page

Click to load comments...

Courses
  • Vue Foundations
  • Vue Fullstack
  • Vue Enterprise
Articles
  • Latest
  • Topics
Newsletter
  • Join
  • Sponsorship
More
  • Discord
  • Vue.js jobs
  • About

Vue.js Developers © 2021. View our privacy policy .

  • RSS
  • |
  • Atom