stripLocation > stripProperties
This commit is contained in:
parent
9d266625b4
commit
9ecb21b749
|
@ -163,7 +163,7 @@ describe( "PEG.js grammar parser", function () {
|
||||||
rules: [ ruleA, ruleB ]
|
rules: [ ruleA, ruleB ]
|
||||||
};
|
};
|
||||||
|
|
||||||
const stripLocation = ( function () {
|
const stripProperties = ( function () {
|
||||||
|
|
||||||
let strip;
|
let strip;
|
||||||
|
|
||||||
|
@ -207,6 +207,7 @@ describe( "PEG.js grammar parser", function () {
|
||||||
grammar( node ) {
|
grammar( node ) {
|
||||||
|
|
||||||
delete node.location;
|
delete node.location;
|
||||||
|
delete node._alwaysConsumesOnSuccess;
|
||||||
|
|
||||||
if ( node.initializer ) {
|
if ( node.initializer ) {
|
||||||
|
|
||||||
|
@ -258,7 +259,7 @@ describe( "PEG.js grammar parser", function () {
|
||||||
|
|
||||||
const result = parser.parse( utils.flag( this, "object" ), options );
|
const result = parser.parse( utils.flag( this, "object" ), options );
|
||||||
|
|
||||||
stripLocation( result );
|
stripProperties( result );
|
||||||
|
|
||||||
this.assert(
|
this.assert(
|
||||||
utils.eql( result, expected ),
|
utils.eql( result, expected ),
|
||||||
|
@ -289,7 +290,7 @@ describe( "PEG.js grammar parser", function () {
|
||||||
|
|
||||||
if ( passed ) {
|
if ( passed ) {
|
||||||
|
|
||||||
stripLocation( result );
|
stripProperties( result );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue