Articles
Latest
More
Newsletter Sponsorship Discord About
Sign up for our Newsletter
The video for this lesson is currently being updated, please read the transcript instead.
Vue Fullstack > Lesson 27

API test setup

In order to test our endpoints, we'll need to be able to interact with our Express server from our test spec files.

All our endpoints are part of our Express instance, so let's export this instance and then we can import it into our tests.

So at the bottom of our server file we can go:

server/index.js

module.exports = app;

Now our server file is actually a module.


Back to course page

Click to load comments...

Articles
  • Latest
Newsletter
  • Join
  • Sponsorship
More
  • Discord
  • Vue.js jobs
  • About

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

  • RSS
  • |
  • Atom