-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix #7490/Fix broken ampersand (#70)
* added unit tests to check behavior of original quote parsing. * fixed issue that flattening tWords tags in original language loses space. added unit tests to check behavior of original quote parsing. moved code from tc-source-content-updater export wordOccurrenceHelpers * clean up * add more test cases
- Loading branch information
1 parent
d80f2f3
commit a0b04d6
Showing
15 changed files
with
22,422 additions
and
14 deletions.
There are no files selected for viewing
367 changes: 367 additions & 0 deletions
367
__tests__/__snapshots__/tsvToGroupdataSingle.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,367 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`tsvToGroupData() - testing quotes Test -1 occurrence 1`] = `"καὶ"`; | ||
|
||
exports[`tsvToGroupData() - testing quotes Test all occurrences 1`] = `"καὶ"`; | ||
|
||
exports[`tsvToGroupData() - testing quotes Test fifth occurrence 1`] = `"καὶ"`; | ||
|
||
exports[`tsvToGroupData() - testing quotes Test multiple ellipsis 1`] = ` | ||
Array [ | ||
Object { | ||
"occurrence": 1, | ||
"word": "τοῖς", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 1, | ||
"word": "καὶ", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 2, | ||
"word": "τοῖς", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 2, | ||
"word": "καὶ", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`tsvToGroupData() - testing quotes Test multiple ellipsis 2 1`] = ` | ||
Array [ | ||
Object { | ||
"occurrence": 1, | ||
"word": "τοῖς", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 1, | ||
"word": "καὶ", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 2, | ||
"word": "τοῖς", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 2, | ||
"word": "καὶ", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 3, | ||
"word": "τοῖς", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 3, | ||
"word": "καὶ", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`tsvToGroupData() - testing quotes Test multiple ellipsis 3 1`] = ` | ||
Array [ | ||
Object { | ||
"occurrence": 1, | ||
"word": "τοῖς", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 1, | ||
"word": "καὶ", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 2, | ||
"word": "τοῖς", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 2, | ||
"word": "καὶ", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 3, | ||
"word": "τοῖς", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 3, | ||
"word": "καὶ", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 4, | ||
"word": "τοῖς", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 4, | ||
"word": "καὶ", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`tsvToGroupData() - testing quotes Test multiple ellipsis and phrases 1`] = ` | ||
Array [ | ||
Object { | ||
"occurrence": 1, | ||
"word": "τοῖς", | ||
}, | ||
Object { | ||
"occurrence": 1, | ||
"word": "καθαροῖς", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 1, | ||
"word": "καὶ", | ||
}, | ||
Object { | ||
"occurrence": 1, | ||
"word": "ἀπίστοις", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 3, | ||
"word": "τοῖς", | ||
}, | ||
Object { | ||
"occurrence": 2, | ||
"word": "καθαροῖς", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 2, | ||
"word": "καὶ", | ||
}, | ||
Object { | ||
"occurrence": 2, | ||
"word": "ἀπίστοις", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`tsvToGroupData() - testing quotes Test second occurrence 1`] = `"καὶ"`; | ||
|
||
exports[`tsvToGroupData() - testing quotes Test simple ampersand 1`] = ` | ||
Array [ | ||
Object { | ||
"occurrence": 1, | ||
"word": "καθαροῖς", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 2, | ||
"word": "τοῖς", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`tsvToGroupData() - testing quotes Test simple ampersand 2 1`] = ` | ||
Array [ | ||
Object { | ||
"occurrence": 2, | ||
"word": "τοῖς", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 1, | ||
"word": "καὶ", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`tsvToGroupData() - testing quotes Test simple ampersand 3 1`] = ` | ||
Array [ | ||
Object { | ||
"occurrence": 1, | ||
"word": "καὶ", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 1, | ||
"word": "ἐν", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`tsvToGroupData() - testing quotes Test simple ampersand with tWord tag 1`] = ` | ||
Array [ | ||
Object { | ||
"occurrence": 1, | ||
"word": "καὶ", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 2, | ||
"word": "ἐν", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`tsvToGroupData() - testing quotes Test simple ampersand with verse range 1`] = ` | ||
Array [ | ||
Object { | ||
"occurrence": 1, | ||
"word": "καὶ", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 3, | ||
"word": "ἐν", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`tsvToGroupData() - testing quotes Test simple ampersand with verse range 2 1`] = ` | ||
Array [ | ||
Object { | ||
"occurrence": 1, | ||
"word": "δοῦλοι", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 1, | ||
"word": "Ἰησοῦ", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`tsvToGroupData() - testing quotes Test simple ampersand with verse range 3 1`] = ` | ||
Array [ | ||
Object { | ||
"occurrence": 1, | ||
"word": "Χριστῷ", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 2, | ||
"word": "Ἰησοῦ", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`tsvToGroupData() - testing quotes Test simple ampersand with verse range 4 1`] = ` | ||
Array [ | ||
Object { | ||
"occurrence": 1, | ||
"word": "ἡμῶν", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 2, | ||
"word": "Χριστοῦ", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`tsvToGroupData() - testing quotes Test simple ampersand with verse range and tWord tag 1`] = ` | ||
Array [ | ||
Object { | ||
"occurrence": 1, | ||
"word": "καὶ", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 1, | ||
"word": "ἐν", | ||
}, | ||
Object { | ||
"occurrence": 1, | ||
"word": "Χριστῷ", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`tsvToGroupData() - testing quotes Test simple ellipsis 1`] = ` | ||
Array [ | ||
Object { | ||
"occurrence": 2, | ||
"word": "τοῖς", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 1, | ||
"word": "καὶ", | ||
}, | ||
] | ||
`; | ||
|
||
exports[`tsvToGroupData() - testing quotes Test three dot with verse range 1`] = ` | ||
Array [ | ||
Object { | ||
"occurrence": 1, | ||
"word": "ἡμῶν", | ||
}, | ||
Object { | ||
"word": "…", | ||
}, | ||
Object { | ||
"occurrence": 2, | ||
"word": "Χριστοῦ", | ||
}, | ||
] | ||
`; |
Oops, something went wrong.