Skip to content

Commit

Permalink
[Tests] Minor tests refactor & downgraded version
Browse files Browse the repository at this point in the history
  • Loading branch information
jvalls-axa committed Jul 2, 2020
1 parent 53a8c14 commit 685fe44
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "parsr",
"version": "1.0.0",
"version": "0.12.2",
"description": "Turn your documents into data!",
"main": "dist/bin/index.js",
"repository": {
Expand Down
6 changes: 3 additions & 3 deletions test/input-extractors.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ describe('PDF.js input module', () => {
runModules(document, [
new OutOfPageRemovalModule(),
new WhitespaceRemovalModule(),
new ReadingOrderDetectionModule(),
new WordsToLineNewModule(),
new ReadingOrderDetectionModule(),
new LinesToParagraphModule(),
]).then(doc => {
exportedText = doc
Expand Down Expand Up @@ -114,8 +114,8 @@ describe('EML input module', () => {
runModules(document, [
new OutOfPageRemovalModule(),
new WhitespaceRemovalModule(),
new ReadingOrderDetectionModule(),
new WordsToLineNewModule(),
new ReadingOrderDetectionModule(),
new LinesToParagraphModule(),
]).then(doc => {
docAfter = doc;
Expand Down Expand Up @@ -177,8 +177,8 @@ describe('MS Word input module', () => {
runModules(document, [
new OutOfPageRemovalModule(),
new WhitespaceRemovalModule(),
new ReadingOrderDetectionModule(),
new WordsToLineNewModule(),
new ReadingOrderDetectionModule(),
new LinesToParagraphModule(),
]).then(doc => {
docAfter = doc;
Expand Down
2 changes: 1 addition & 1 deletion test/json-export-import.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ describe('JSON export and import', () => {
function clean(json: Document): Promise<Document> {
Element.resetGlobalId();
return runModules(json, [
new ReadingOrderDetectionModule(),
new WordsToLineNewModule(),
new ReadingOrderDetectionModule(),
new LinesToParagraphModule(),
new HierarchyDetectionModule(),
]);
Expand Down
3 changes: 1 addition & 2 deletions test/line-merge.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import { expect } from 'chai';
import { withData } from 'leche';
import 'mocha';
import { ReadingOrderDetectionModule } from '../server/src/processing/ReadingOrderDetectionModule/ReadingOrderDetectionModule';
import { WordsToLineNewModule } from '../server/src/processing/WordsToLineNewModule/WordsToLineNew';
import { Document, Element } from '../server/src/types/DocumentRepresentation';
import { getDocFromJson, runModules } from './helpers';
Expand All @@ -36,7 +35,7 @@ describe('Line merge function', () => {

before(done => {
function transform(json: Document) {
return runModules(json, [new ReadingOrderDetectionModule(), new WordsToLineNewModule()]);
return runModules(json, [new WordsToLineNewModule()]);
}

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

0 comments on commit 685fe44

Please sign in to comment.