@@ -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)) {
6767const skipText = skip ? '[SKIP] ' : '' ;
6868const ecode = `\u001B${ code } ` ;
6969
70- test ( `${ skipText } ${ code } → ${ codeInfo [ 0 ] } ` , t => {
70+ test ( `${ codeSet } - ${ skipText } ${ code } → ${ codeInfo [ 0 ] } ` , t => {
7171if ( skip ) {
7272t . pass ( ) ;
7373return ;
@@ -79,13 +79,13 @@ for (const codeSet of Object.keys(ansiCodes)) {
7979t . is ( string . replace ( ansiRegex ( ) , '' ) , 'hello' ) ;
8080} ) ;
8181
82- test ( `${ skipText } ${ code } should not overconsume` , t => {
82+ test ( `${ codeSet } - ${ skipText } ${ code } should not overconsume` , t => {
8383if ( skip ) {
8484t . pass ( ) ;
8585return ;
8686}
8787
88- for ( const c of consumptionChars ) {
88+ for ( const c of consumptionCharacters ) {
8989const string = ecode + c ;
9090t . regex ( string , ansiRegex ( ) ) ;
9191t . is ( string . match ( ansiRegex ( ) ) [ 0 ] , ecode ) ;
0 commit comments