-
- Downloads
Place tests alongside their code (#969)
Reorg of the tests: move them just alongside their code. The principle relates to grouping by coupling, not by function and is established in best-practice documents (e.g. https://github.com/focusaurus/express_code_structure#underlying-principles-and-motivations), despite its break from the tradition of a separate `test/` tree. All of today's tools can handle tests spread through the repository. There are some good, if subtle consequences of this change: - Since files are close at hand, friction is reduced at development time, which encourages that new tests are written to cover new behaviors. - It's easier to find the tests that cover a particular piece of functionality. - It's easier to see which code has tests and which doesn't.
Showing
- gh-badge.spec.js 61 additions, 0 deletionsgh-badge.spec.js
- lib/badge.spec.js 1 addition, 1 deletionlib/badge.spec.js
- lib/in-process-server-test-helpers.js 1 addition, 1 deletionlib/in-process-server-test-helpers.js
- lib/lru-cache.spec.js 1 addition, 1 deletionlib/lru-cache.spec.js
- lib/svg-to-img.spec.js 2 additions, 2 deletionslib/svg-to-img.spec.js
- lib/test-config.js 0 additions, 0 deletionslib/test-config.js
- package.json 1 addition, 1 deletionpackage.json
- server.spec.js 3 additions, 62 deletionsserver.spec.js
- service-tests/runner/cli.js 1 addition, 1 deletionservice-tests/runner/cli.js
- service-tests/runner/service-tester.js 1 addition, 1 deletionservice-tests/runner/service-tester.js
Loading
Please register or sign in to comment