dgarlitt / karma-nyan-reporter

Nyan Cat style reporter based on the Mocha version
MIT License
169 stars 19 forks source link

Adds user option to underline user-selected file type in error report #30

Closed whyboris closed 7 years ago

whyboris commented 7 years ago

User can edit reporter options:

      // underline filename of some file type
      // All files in the error report that have this
      // particular extention will be underlined 
      underlineFileType: 'spec.ts' // default is ''

Using RegEx, the reporter will now find all instances of sper.ts in the error report and underline the full file name:

invoke@webpack:///~/zone.js/dist/zone.js:464:0 <- src/polyfills.ts:1619:44
timer@webpack:///~/zone.js/dist/zone.js:1655:0 <- src/polyfills.ts:2810:34
webpack:///src/app/compose/meta-tray/meta-tray.component.spec.ts:41:32 <- src/test.ts:37698:37
invoke@webpack:///~/zone.js/dist/zone.js:365:0 <- src/polyfills.ts:1520:31
onInvoke@webpack:///~/zone.js/dist/proxy.js:79:0 <- src/test.ts:95817:45
invoke@webpack:///~/zone.js/dist/zone.js:364:0 <- src/polyfills.ts:1519:40

Instead of hurting your eyes looking through the wall of text, you'd see the 3rd line's meta-tray.component.spec.ts nicely underlined

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-15.9%) to 84.066% when pulling 517b2c83c937ddaf07dd1d2c04f0e2d06a7bd60a on whyboris:underlinefile into 68da8261defe424c4ecf7805034f2de778c06d96 on dgarlitt:master.

whyboris commented 7 years ago

I recommend closing this PR in lieu of https://github.com/dgarlitt/karma-nyan-reporter/pull/33