Skip to content

Commit

Permalink
usage fixed version of ezs
Browse files Browse the repository at this point in the history
  • Loading branch information
touv committed Sep 18, 2024
1 parent 600f6bb commit e3a7686
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 51 deletions.
50 changes: 28 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
"@emotion/react": "11.7.1",
"@emotion/styled": "11.6.0",
"@ezs/analytics": "2.3.2",
"@ezs/basics": "2.7.1",
"@ezs/basics": "2.7.2",
"@ezs/conditor": "2.12.2",
"@ezs/core": "3.10.3",
"@ezs/core": "3.10.4",
"@ezs/istex": "1.5.9",
"@ezs/lodex": "file:./packages/ezsLodex",
"@ezs/sparql": "1.2.3",
Expand Down
1 change: 0 additions & 1 deletion src/api/controller/api/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import route from 'koa-route';
import asyncBusboy from '@recuperateur/async-busboy';
import config from 'config';
import koaBodyParser from 'koa-bodyparser';
import fs from 'fs';

import progress from '../../services/progress';
import { PENDING, UPLOADING_DATASET } from '../../../common/progressStatus';
Expand Down
25 changes: 0 additions & 25 deletions src/api/services/fsHelpers.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,29 +99,4 @@ describe('fsHelpers', () => {
});
});
});

describe('mergeChunksFactory', () => {
const createReadStreamImpl = jest.fn((v) => `read stream for ${v}`);
const multiStreamImpl = jest.fn(() => 'merged stream');
beforeAll(async () => {
await mergeChunksFactory(createReadStreamImpl, multiStreamImpl)(
'filename',
3,
);
});

it('should have called createReadStreamImpl with each generated chunkname', () => {
expect(createReadStreamImpl).toHaveBeenCalledWith('filename.1');
expect(createReadStreamImpl).toHaveBeenCalledWith('filename.2');
expect(createReadStreamImpl).toHaveBeenCalledWith('filename.3');
});

it('should have called multiStreamImpl with created array of readStream and write stream', () => {
expect(multiStreamImpl).toHaveBeenCalledWith([
'read stream for filename.1',
'read stream for filename.2',
'read stream for filename.3',
]);
});
});
});
2 changes: 1 addition & 1 deletion src/api/services/import.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ describe.skip('import', () => {
},
update: jest.fn(),
},
getCustomLoader: jest.fn().mockImplementation(() => loader),
getCustomLoader: () => loader,
mergeChunks: jest.fn().mockImplementation(() => 'stream'),
clearChunks: jest.fn(),
saveParsedStream: jest.fn(),
Expand Down

0 comments on commit e3a7686

Please sign in to comment.