@@ -2,7 +2,7 @@ import test from 'ava';
22import ansiCodes from './fixtures/ansi-codes' ;
33import ansiRegex from '.' ;
44
5- const consumptionChars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_+1234567890-=[]{};\':"./>?,<\\|' ;
5+ const consumptionCharacters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_+1234567890-=[]{};\':"./>?,<\\|' ;
66
77// Testing against codes found at: http://ascii-table.com/ansi-escape-sequences-vt-100.php
88test ( 'match ansi code in a string' , t => {
@@ -67,7 +67,7 @@ for (const codeSet of Object.keys(ansiCodes)) {
6767 const skipText = skip ? '[SKIP] ' : '' ;
6868 const ecode = `\u001B${ code } ` ;
6969
70- test ( `${ skipText } ${ code } → ${ codeInfo [ 0 ] } ` , t => {
70+ test ( `${ codeSet } - ${ skipText } ${ code } → ${ codeInfo [ 0 ] } ` , t => {
7171 if ( skip ) {
7272 t . pass ( ) ;
7373 return ;
@@ -79,13 +79,13 @@ for (const codeSet of Object.keys(ansiCodes)) {
7979 t . is ( string . replace ( ansiRegex ( ) , '' ) , 'hello' ) ;
8080 } ) ;
8181
82- test ( `${ skipText } ${ code } should not overconsume` , t => {
82+ test ( `${ codeSet } - ${ skipText } ${ code } should not overconsume` , t => {
8383 if ( skip ) {
8484 t . pass ( ) ;
8585 return ;
8686 }
8787
88- for ( const c of consumptionChars ) {
88+ for ( const c of consumptionCharacters ) {
8989 const string = ecode + c ;
9090 t . regex ( string , ansiRegex ( ) ) ;
9191 t . is ( string . match ( ansiRegex ( ) ) [ 0 ] , ecode ) ;
0 commit comments