Этот материал находится в платной подписке. Оформи премиум подписку и смотри или слушай Nodejs Express - unit testing/integration tests with Jest, а также все другие курсы, прямо сейчас!
Премиум
  • Урок 1. 00:01:19
    Initialising project
  • Урок 2. 00:03:51
    Hello World Express REST API in less than 5 mins!
  • Урок 3. 00:01:31
    CRUD Methods we are going to build the TDD-way in REST
  • Урок 4. 00:00:40
    Short intro to Jest + How to install Jest in our project
  • Урок 5. 00:03:56
    Our first test with Jest and Express REST API
  • Урок 6. 00:01:17
    Making our first test with Jest + Express REST API pass!
  • Урок 7. 00:01:22
    Make Jest run automatically on file changes
  • Урок 8. 00:03:28
    Defining a data model for our Todo items with Mongoose
  • Урок 9. 00:04:05
    Using jest.fn to mock our Mongoose model functions
  • Урок 10. 00:01:41
    Making our test with Jest mock model pass
  • Урок 11. 00:01:29
    How to configure Jest test environment
  • Урок 12. 00:03:23
    How to mock Request and Response objects in Express API
  • Урок 13. 00:02:46
    Writing test with mock Request object and making it pass!
  • Урок 14. 00:01:18
    Using beforeEach in Jest tests
  • Урок 15. 00:02:37
    Testing if response code is 201 and response is sent
  • Урок 16. 00:04:48
    Test if response is sending back JSON body
  • Урок 17. 00:06:36
    Creating our first integration test with Supertest and Jest
  • Урок 18. 00:01:50
    How to make our Express app ready for integration testing
  • Урок 19. 00:03:16
    Creating our Express Router
  • Урок 20. 00:02:09
    How to debug tests in Jest
  • Урок 21. 00:01:01
    Setting up Express JSON request body middleware
  • Урок 22. 00:01:05
    Fix for address already in use error
  • Урок 23. 00:03:01
    Making our controller function use async/await
  • Урок 24. 00:02:04
    Setting up our MongoDB database in the cloud!
  • Урок 25. 00:01:25
    Creating a MongoDB database user
  • Урок 26. 00:03:18
    Connect to MongoDB database with Mongoose
  • Урок 27. 00:03:30
    Modify our unit tests to use async/await
  • Урок 28. 00:02:09
    Creating a server.js for running our Express REST API manually
  • Урок 29. 00:03:06
    Manual Testing with Postman
  • Урок 30. 00:02:56
    Oops! We're missing error handling!
  • Урок 31. 00:03:17
    Unit tests for error handling
  • Урок 32. 00:00:55
    Making our error handling unit test PASS
  • Урок 33. 00:01:42
    Creating a integration test for error handling
  • Урок 34. 00:01:15
    Manual test for error handling
  • Урок 35. 00:00:48
    Making a test for errors returning JSON body
  • Урок 36. 00:02:31
    Create middleware to parse errors in JSON
  • Урок 37. 00:02:03
    Making all of our tests pass and final manual test!
  • Урок 38. 00:01:27
    Intro + first test exercise
  • Урок 39. 00:01:37
    Making first test for getTodos pass
  • Урок 40. 00:03:23
    Test if TodoModel.find is called
  • Урок 41. 00:04:34
    Test if response is being sent back correctly
  • Урок 42. 00:03:48
    Test for error handling
  • Урок 43. 00:03:59
    Integration test for GET /todos
  • Урок 44. 00:00:57
    Manual test with Postman
  • Урок 45. 00:02:43
    Intro + Getting first test done
  • Урок 46. 00:03:15
    Creating mock function TodoModel.findById and test for calls
  • Урок 47. 00:01:44
    Exercise! Make test for response and make test pass!
  • Урок 48. 00:04:20
    Solution to response testing with getById()
  • Урок 49. 00:02:54
    Error handling unit test
  • Урок 50. 00:02:31
    If TodoModel could not be found in database
  • Урок 51. 00:03:58
    Integration test for GET /todos/:todoId
  • Урок 52. 00:03:08
    404 Integration test + final manual tests
  • Урок 53. 00:01:07
    Intro to PUT method and first test
  • Урок 54. 00:04:50
    Test if TodoModel.findByIdAndUpdate is called
  • Урок 55. 00:03:07
    Test if PUT response is sent back
  • Урок 56. 00:02:18
    Test HTTP PUT error handling
  • Урок 57. 00:02:10
    HTTP PUT 404 test
  • Урок 58. 00:03:59
    HTTP PUT Integration test
  • Урок 59. 00:02:59
    Using Jest.mock instead of multiple Jest.fn + Intro to final challenge!
  • Урок 60. 00:08:15
    Unit tests for HTTP Delete method
  • Урок 61. 00:06:12
    Integration test for HTTP Delete Method + manual test + you are awesome!!