Skip to content

Commit 685fe44

Browse files
committed
[Tests] Minor tests refactor & downgraded version
1 parent 53a8c14 commit 685fe44

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "parsr",
3-
"version": "1.0.0",
3+
"version": "0.12.2",
44
"description": "Turn your documents into data!",
55
"main": "dist/bin/index.js",
66
"repository": {

test/input-extractors.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ describe('PDF.js input module', () => {
6262
runModules(document, [
6363
new OutOfPageRemovalModule(),
6464
new WhitespaceRemovalModule(),
65-
new ReadingOrderDetectionModule(),
6665
new WordsToLineNewModule(),
66+
new ReadingOrderDetectionModule(),
6767
new LinesToParagraphModule(),
6868
]).then(doc => {
6969
exportedText = doc
@@ -114,8 +114,8 @@ describe('EML input module', () => {
114114
runModules(document, [
115115
new OutOfPageRemovalModule(),
116116
new WhitespaceRemovalModule(),
117-
new ReadingOrderDetectionModule(),
118117
new WordsToLineNewModule(),
118+
new ReadingOrderDetectionModule(),
119119
new LinesToParagraphModule(),
120120
]).then(doc => {
121121
docAfter = doc;
@@ -177,8 +177,8 @@ describe('MS Word input module', () => {
177177
runModules(document, [
178178
new OutOfPageRemovalModule(),
179179
new WhitespaceRemovalModule(),
180-
new ReadingOrderDetectionModule(),
181180
new WordsToLineNewModule(),
181+
new ReadingOrderDetectionModule(),
182182
new LinesToParagraphModule(),
183183
]).then(doc => {
184184
docAfter = doc;

test/json-export-import.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ describe('JSON export and import', () => {
4040
function clean(json: Document): Promise<Document> {
4141
Element.resetGlobalId();
4242
return runModules(json, [
43-
new ReadingOrderDetectionModule(),
4443
new WordsToLineNewModule(),
44+
new ReadingOrderDetectionModule(),
4545
new LinesToParagraphModule(),
4646
new HierarchyDetectionModule(),
4747
]);

test/line-merge.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import { expect } from 'chai';
1818
import { withData } from 'leche';
1919
import 'mocha';
20-
import { ReadingOrderDetectionModule } from '../server/src/processing/ReadingOrderDetectionModule/ReadingOrderDetectionModule';
2120
import { WordsToLineNewModule } from '../server/src/processing/WordsToLineNewModule/WordsToLineNew';
2221
import { Document, Element } from '../server/src/types/DocumentRepresentation';
2322
import { getDocFromJson, runModules } from './helpers';
@@ -36,7 +35,7 @@ describe('Line merge function', () => {
3635

3736
before(done => {
3837
function transform(json: Document) {
39-
return runModules(json, [new ReadingOrderDetectionModule(), new WordsToLineNewModule()]);
38+
return runModules(json, [new WordsToLineNewModule()]);
4039
}
4140

4241
getDocFromJson(transform, jsonName).then(after => {

0 commit comments

Comments
 (0)