File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
packages/jest-each/src/table Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const PRETTY_PLACEHOLDER = '%p';
1717const INDEX_PLACEHOLDER = '%#' ;
1818const NUMBER_PLACEHOLDER = '%$' ;
1919const PLACEHOLDER_PREFIX = '%' ;
20- const ESCAPED_PLACEHOLDER_PREFIX = / % % / g ;
20+ const ESCAPED_PLACEHOLDER_PREFIX = '%%' ;
2121const JEST_EACH_PLACEHOLDER_ESCAPE = '@@__JEST_EACH_PLACEHOLDER_ESCAPE__@@' ;
2222
2323export default function array (
@@ -77,17 +77,11 @@ const formatTitle = (
7777 rowIndex ,
7878 ) ,
7979 )
80- . replaceAll (
81- new RegExp ( JEST_EACH_PLACEHOLDER_ESCAPE , 'g' ) ,
82- PLACEHOLDER_PREFIX ,
83- ) ;
80+ . replaceAll ( JEST_EACH_PLACEHOLDER_ESCAPE , PLACEHOLDER_PREFIX ) ;
8481
8582const normalisePlaceholderValue = ( value : unknown ) =>
8683 typeof value === 'string'
87- ? value . replaceAll (
88- new RegExp ( PLACEHOLDER_PREFIX , 'g' ) ,
89- JEST_EACH_PLACEHOLDER_ESCAPE ,
90- )
84+ ? value . replaceAll ( PLACEHOLDER_PREFIX , JEST_EACH_PLACEHOLDER_ESCAPE )
9185 : value ;
9286
9387const getMatchingPlaceholders = ( title : string ) =>
You can’t perform that action at this time.
0 commit comments