Commit Graph
14 Commits
Author SHA1 Message Date
Paul MelnikowandGitHub 77ff19903d Test the notfound routes in server.js (#2398) 2018-11-27 16:36:20 -05:00
Paul MelnikowandGitHub a6a1aaeb70 Friendlier test failures when services won’t register (#2350)
Avoids crashes in `server.spec.js` accompanied by this cryptic message:

```
Error: listen EADDRINUSE :::1111
  at Object._errnoException (util.js:1022:11)
  at _exceptionWithHostPort (util.js:1044:20)
  at Camp.setupListenHandle [as _listen2] (net.js:1367:14)
  at listenInCluster (net.js:1408:12)
  at doListen (net.js:1517:7)
  at _combinedTickCallback (internal/process/next_tick.js:141:11)
  at process._tickDomainCallback (internal/process/next_tick.js:218:9)
```

e.g. https://circleci.com/gh/badges/shields/24094
2018-11-18 13:20:08 -05:00
chris48sandGitHub b68ac16092 Move NPM package files out of /lib ; affects [resharper nuget myget dub chocolatey github] (#2300)
* move gh-badges files out of /lib

As far as possible, this is just moving files
around and updating paths however there are 2
functional changes in this commit:
- remove use of lib/register-chai-plugins.spec
  in badge-cli.spec.js
- remove use of starRating()
  in text-measurer.spec.js

* update service tests that use colorscheme.json

* split package.json in two

* clean up import

* don't hard-code path

* start a changelog

* put a license file in the package dir

* re-organise documentation 📚

* don't pack test files

* remove favicon from Makefile

* give package its own test command

* link the docs better in README
2018-11-15 18:48:01 +00:00
chris48sandGitHub 819202bcf3 treat label as override in static badge (#2116)
closes #2112
2018-10-06 15:09:59 +01:00
Paul MelnikowandGitHub 1b307864b4 Prettify the files in the project root (#2041)
Follow on to #2009
2018-09-02 12:10:23 -07:00
DanialandGitHub bbfd75a203 increase timeout for colorscheme PNG badge test (#1811) 2018-07-26 17:54:23 +12:00
Paul MelnikowandGitHub 6c2ce413b1 Adopt async-await for most promise-based code (#1565)
* Address todo for Node 8 upgrade
2018-03-15 09:36:40 -04:00
Fuzz Stati0nandDanial 3f933594a0 Uncaught TypeError crashes server on numeric or boolean 'link' parameter (#1520) 2018-02-25 22:46:35 +01:00
Paul MelnikowandGitHub 7c1a3fef69 Adopt Chai for assertions (#1419) 2018-01-08 14:18:07 -07:00
Daniel Lo NigroandPaul Melnikow 02683afd04 Don't crash when logo passed as integer (#1319) 2018-01-04 17:11:59 -07:00
Paul MelnikowandGitHub 0a2a80415c Increase the timeout on a test that often runs out of time (#1392)
e.g. #1391
2017-12-26 16:24:14 -05:00
Paul MelnikowandGitHub 653f79fbde Tests: Convert to ES6, use node-fetch, refactor, and clean up style (#971) 2017-04-30 10:51:18 -04:00
Paul MelnikowandGitHub f47aa968cd Prepare to modify / refactor analytics (#970)
- Move analytics into their own file
- Add test of analytics endpoint
2017-04-28 01:06:06 -04:00
Paul MelnikowandGitHub c3ef232bf7 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.
2017-04-28 00:55:15 -04:00