Skip to content

Commit

Permalink
Fix bug with tag group equivalence that was causing tests to fail
Browse files Browse the repository at this point in the history
Also delete semicolon from commented-out auxiliary spec file line.
  • Loading branch information
happy5214 committed Sep 13, 2024
1 parent db0b4ae commit c68bdd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion parser/parsedHedGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,11 @@ export class ParsedHedGroup extends ParsedHedSubstring {
if (!(other instanceof ParsedHedGroup)) {
return false
}
return differenceWith(this.tags, other.tags, (ours, theirs) => ours.equivalent(theirs)).length === 0
const equivalence = (ours, theirs) => ours.equivalent(theirs)
return (
differenceWith(this.tags, other.tags, equivalence).length === 0 &&
differenceWith(other.tags, this.tags, equivalence).length === 0
)
}

/**
Expand Down
2 changes: 1 addition & 1 deletion spec_tests/jsonTests.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const skippedErrors = {
}
const readFileSync = fs.readFileSync
const test_file_name = 'javascript_tests.json'
//const test_file_name = 'temp3.json';
//const test_file_name = 'temp3.json'

function comboListToStrings(items) {
const comboItems = []
Expand Down

0 comments on commit c68bdd6

Please sign in to comment.