File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// Prettier offers a clean way to define ignored properties.
2- const ignoredProperties = new Set ( [ 'loc' , 'range' , 'comments' ] ) ;
2+ const ignoredProperties = new Set ( [
3+ 'loc' ,
4+ 'range' ,
5+ 'comments' ,
6+ // this function is defined at constructor time so it won't pass AST
7+ // comparisons.
8+ 'cleanModifierInvocationArguments'
9+ ] ) ;
310// eslint-disable-next-line @typescript-eslint/no-empty-function
411function clean ( /* ast, newObj, parent */ ) : void { }
512clean . ignoredProperties = ignoredProperties ;
Original file line number Diff line number Diff line change @@ -358,9 +358,7 @@ async function runTest({
358358 if ( isAstUnstableTest ) {
359359 expect ( formattedAst ) . not . toEqual ( originalAst ) ;
360360 } else {
361- expect ( JSON . parse ( JSON . stringify ( formattedAst ) ) ) . toEqual (
362- JSON . parse ( JSON . stringify ( originalAst ) ) ,
363- ) ;
361+ expect ( formattedAst ) . toEqual ( originalAst ) ;
364362 }
365363 }
366364
You can’t perform that action at this time.
0 commit comments