vercel / micro

Asynchronous HTTP microservices
MIT License
10.59k stars 458 forks source link

Remove duplicated code "getUrl" (tests) #436

Closed joeyrogues closed 4 years ago

joeyrogues commented 4 years ago

Very small improvement.

Good to know: ava consider files starting with a _ to be helper files. Therefore, the _test-utils.js file is not "asserted".

Interesting: I decided to use a closure (dependency injection) because micro requires the NODE_ENV to be set before import.