A TDD journey through a changing tax.
In 2003, Stamp Duty Land Tax (SDLT) was introduced.
| House price | Rate (%) |
|---|
| import { render, screen } from "@testing-library/react"; | |
| import userEvent from "@testing-library/user-event"; | |
| import { useState } from "react"; | |
| const App = () => { | |
| const [count, setCount] = useState(0); | |
| return ( | |
| <div> | |
| <div>{count}</div> | |
| <button onClick={() => setCount((c) => c + 1)}>Click me!</button> |
| const express = require("express"); | |
| const request = require("supertest"); | |
| const StatusCodes = { CREATED: 201 }; | |
| const fakeUserData = {}; | |
| const app = express(); | |
| it("returns a 201 on successful signup", (done) => { | |
| request(app) |
| FOO=123 | |
| BAR=hello, world! |
This is a:
Here is how to add Cypress E2E tests to a Create React App bootstrapped application. Assumes the *nix command line, you may need to adapt this for a Windows command line (or use WSL or Git Bash).
Install Cypress and the Testing Library utilities for it (to match the helpers CRA installs):
$ npm i {,@testing-library/}cypressi is short for install, and the braces {} are expanded by brace expansion to cypress @testing-library/cypress.
| Escaped |
|---|
| | |
Markup:
| Escaped |
|---|
| \| |
| 👩💻 Tester | 👹 Evil Coder | 👨🏫 Invigilator |
|---|---|---|
| Write a failing test | Don’t read the exercise! | No talking |
| Keep it simple | Make the test pass | Don't take large steps |
| Try to drive the code writer to the expected solution | Try to do it in a surprising way | Don't ignore bad test feedback |
No more than 3 || or && |
| # empty |
Hi here is some text this is red.