Tag
testing
Published articles tagged testing.
Testing NestJS applications
Dependency injection is what makes a NestJS app easy to test: any provider can be swapped for a fake before the module is compiled. This chapter covers unit tests with the testing module, overriding providers and guards, and end-to-end tests that send real HTTP requests with supertest.
Testing TypeScript with Jest
Refer to https://jestjs.io/docs/getting-started
SinonJS with Mocha
Fakes, spies and stubs are created in the default sandbox which needs to be restored after each test to prevent memory leaks. We use a Mocha hook plugin for that:
The concepts of testing
When it comes to speaking how many tests there should be for each test type then you can assume that you will write mostly Unit Tests, a moderate amount of Integration Tests and a relatively small…
Testing with Cypress.io 12
Selenium and most other testing tools run outside of the browser and execute remote commands across the network. Cypress does the opposite as it is executed in the same run loop as the application.…
Testing React Components
We are going to have a look at how you can test your React Components and your Redux reducers and actions.
Testing JavaScript NodeJS files with Mocha and Chai
This article will demonstrate how to test JavaScript files in NodeJS using the libraries Sinon, Mocha and Chai. Sinon is often installed together with Mocha and Chai, but it is not required.