Skip to content
Myr

feat(dev): add `colorize` option for `showRoutes()` (#1886)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* feat(dev): add `colorize` option for `showRoutes()` * denoify

authored by Yusuke Wada · committed by GitHub · parent 74287a8 · Browse files · 3 files+20 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+20 added−2 removed

  • tests:+14 added−0 removed
  • other:+6 added−2 removed

3 files+20 added−2 removed

modified:deno_dist/helper/dev/index.ts+3 added-1 removed
modified:src/helper/dev/index.test.ts+14 added
108 unmodified lines
109 '\x1b[32mGET\x1b[0m /static',110 ' [handler]',111 ])112 })113114 it('should render not colorized output', async () => {115 showRoutes(app, { colorize: false })116 expect(logs).toEqual([117 'GET /',118 'GET /named',119 'POST /',120 'PUT /',121 'PATCH /',122 'DELETE /',123 'OPTIONS /',124 'GET /static',125 ])126 })127})128129describe('geRouterName()', () => {130 it('Should return the correct router name', async () => {
6 unmodified lines
modified:src/helper/dev/index.ts+3 added-1 removed