From d4295d63a2a34893fd1e4b74fe780a113ba1b12c Mon Sep 17 00:00:00 2001 From: Sebastian Mihalache <sebi.mihalache@gmail.com> Date: Fri, 9 Nov 2018 12:25:07 +0200 Subject: [PATCH] fix(mts-package): fix lint and tests --- .../tests/helpers.test.js | 6 ++ packages/component-mts-package/tests/mocks.js | 84 ------------------- 2 files changed, 6 insertions(+), 84 deletions(-) create mode 100644 packages/component-mts-package/tests/helpers.test.js diff --git a/packages/component-mts-package/tests/helpers.test.js b/packages/component-mts-package/tests/helpers.test.js new file mode 100644 index 000000000..92d5ac2fc --- /dev/null +++ b/packages/component-mts-package/tests/helpers.test.js @@ -0,0 +1,6 @@ +process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0' +process.env.SUPPRESS_NO_CONFIG_WARNING = true + +describe('MTS helpers', () => { + it('should return success when the parameters are correct', async () => true) +}) diff --git a/packages/component-mts-package/tests/mocks.js b/packages/component-mts-package/tests/mocks.js index 1eb94b697..d88427c2a 100644 --- a/packages/component-mts-package/tests/mocks.js +++ b/packages/component-mts-package/tests/mocks.js @@ -1,89 +1,5 @@ const config = require('../config/default') -const fragment = { - id: '57c7560b-6c1c-480d-a207-cb388d60a213', - type: 'fragment', - files: { - coverLetter: [], - manuscripts: [ - { - id: - '57c7560b-6c1c-480d-a207-cb388d60a213/170ef7b5-bdfd-4637-908d-a693b8c07928', - name: 'Revolut-EUR-Statement-Jan 8, 2018.pdf', - size: 63347, - }, - ], - supplementary: [ - { - id: - '57c7560b-6c1c-480d-a207-cb388d60a213/170ef7b5-bdfd-4637-908d-a693b8c07928', - name: 'SUP__Revolut-EUR-Statement-Jan 8, 2018.pdf', - size: 63347, - }, - ], - responseToReviewers: [], - }, - owners: [ - { - id: '79a35051-7744-49f0-bdfb-388dfe9d7bd3', - username: 'hindawi+auth@thinslices.com', - }, - ], - authors: [ - { - id: '79a35051-7744-49f0-bdfb-388dfe9d7bd3', - email: 'hindawi+auth@thinslices.com', - title: 'mr', - lastName: 'Manuscriptunson', - firstName: 'Author', - affiliation: 'Hindawi', - isSubmitting: true, - isCorresponding: true, - }, - { - id: 'd2c4aac6-af51-4421-98c6-cbbc862160d4', - email: 'hindawi+coauthor@thinslices.com', - lastName: 'Southgate', - firstName: 'Gareth 4thplace', - affiliation: 'UK', - isSubmitting: false, - isCorresponding: false, - }, - ], - created: '2018-07-20T13:16:39.635Z', - version: 1, - metadata: { - type: 'clinical-study', - issue: 'regular-issue', - title: '<p>Harry Kane</p>', - journal: 'hindawi-faraday', - abstract: '<p>Golden boot, golden boy.</p>', - customId: '7654321', - }, - conflicts: { hasConflicts: 'no' }, - submitted: 1532092696032, - collectionId: 'afe691b5-8134-4e5c-b6e3-354a2ed473b5', - declarations: [ - 'has-email', - 'has-manuscript', - 'has-efiles', - 'ok-article-processing', - 'has-orcid', - 'ok-institutional', - ], - fragmentType: 'version', - recommendations: [ - { - id: '3f86ab07-14c8-4151-8185-d83054cb1c93', - userId: '36319eb1-d245-47d1-b010-4fc1b33d0e41', - createdOn: 1532094805409, - updatedOn: 1532094805409, - recommendation: 'publish', - recommendationType: 'editorRecommendation', - }, - ], -} - const fragmentWithRecommendations = { type: 'fragment', files: { -- GitLab