unit-testing.md

July 15, 2021 · View on GitHub

Bookmarks tagged [unit-testing]

www.codever.land/bookmarks/t/unit-testing

XMLUnit - Unit Testing XML for Java and .NET home page

https://www.xmlunit.org/

When testing XML your application creates, simple string comparisons don't cut it as there are many different ways the same XML content is serialized to a string. It doesn't even stop with serializati...


A Unit Tester's Guide to Mockito

https://www.toptal.com/java/a-guide-to-everyday-mockito

In this article, we’ll cover creating and configuring mocks and using them to verify the expected behavior of the system being tested. We’ll also dive a bit into Mockito’s internals to better understa...


UnitTest

https://martinfowler.com/bliki/UnitTest.html

Unit testing is often talked about in software development, and is a term that I've been familiar with during my whole time writing programs. Like most software development terminology, however, it's ...


UnitTest : Solitary or Sociable | Martin Fowler

https://martinfowler.com/bliki/UnitTest.html#SolitaryOrSociable


Calen Legaspi: Separating Integration Tests from Unit Tests Using Maven Failsafe & JUnit @Category

http://calenlegaspi.blogspot.ch/2015/01/separating-integration-tests-from-unit.html

TDD at the Unit Testing level is fairly straight-forward, since classes in unit testing either do not have complex dependencies, or you mock-out the dependencies with a mocking framework (ex. Mockito)...


Writing Your F.I.R.S.T Unit Tests - DZone Java

https://dzone.com/articles/writing-your-first-unit-tests

When writing unit tests in Java, stick to FIRST. Your tests should be fast, independent, repeatable, self-validating, and timely (unless you're using TDD).


Setting up test coverage using Mocha, Istanbul, NYC with TypeScript

http://azimi.me/2016/09/30/nyc-mocha-typescript.1.html

package.json + mocha.opts configuration to get mocha and instanbul running with typescript


Using Istanbul With TypeScript & mocha

https://istanbul.js.org/docs/tutorials/typescript/

Thanks to @mohsen1's post the following is the minimum recommended configuration to get accurate TypeScript coverage with mocha. With this…


Best Practices for Spies, Stubs and Mocks in Sinon.js - Semaphore

https://semaphoreci.com/community/tutorials/best-practices-for-spies-stubs-and-mocks-in-sinon-js

In this article, we'll show you the differences between spies, stubs and mocks, when and how to use them, and give you a set of best practices to help you avoid common pitfalls.


Sinon.JS Assertions for Chai - Chai

http://chaijs.com/plugins/sinon-chai/

Sinon–Chai provides a set of custom assertions for using the Sinon.JS spy, stub, and mocking framework with the Chai assertion library. You get all the benefits of Chai with all the powerful tools of ...


chai-as-promised

https://www.npmjs.com/package/chai-as-promised

Extends Chai with assertions about promises.

You can write code that expresses what you really mean:


Assert | Node.js Documentation

https://nodejs.org/api/assert.html

The assert module provides a simple set of assertion tests that can be used to test invariants.


The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon · GitHub

https://gist.github.com/yoavniran/1e3b0162e1545055429e


Sinon.JS

http://sinonjs.org/

Standalone test spies, stubs and mocks for JavaScript. Works with any unit testing framework.


Chai home page

http://chaijs.com/

Chai is a BDD / TDD assertion library for node and the browser that can be delightfully paired with any javascript testing framework.


Mocha - home page

http://mochajs.org/

Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate report...


Unit Testing and TDD in Node.js – Part 1 | Codementor

https://www.codementor.io/davidtang/unit-testing-and-tdd-in-node-js-part-1-8t714s877

Testing is an important practice in software development to improve software quality. There are many forms of testing; manual testing, acceptance testing, unit testing, and a few others. In this post ...


GitHub - node-nock/nock

https://github.com/node-nock/nock

nock - HTTP mocking and expectations library


Node Hero - Node.js Unit Testing Tutorial | @RisingStack

https://blog.risingstack.com/node-hero-node-js-unit-testing-tutorial/

Learn what is unit testing in Node.js, and how to test your applications properly. This article is the 9th part of the Node Hero tutorial series.


Introduction to Unit Testing in Angular ← Alligator.io

https://alligator.io/angular/introduction-unit-testing/

It’s easy to get started with unit testing for Angular 2+ apps. If your projects was setup using the Angular CLI, everything will be ready for you to start writing tests using Jasmine as the testing f...


Why Most Unit Testing is Waste

http://rbcs-us.com/documents/Why-Most-Unit-Testing-is-Waste.pdf

In the early days of computing when computers were slow, unit tests gave the developer more immediate feedback about whether a change broke the code instead of waiting for system tests to run. Today, ...