Skip to content

Commit

Permalink
test(mzData): add real test case
Browse files Browse the repository at this point in the history
  • Loading branch information
maasencioh committed Jul 3, 2017
1 parent 9f7b8d7 commit e7e314b
Show file tree
Hide file tree
Showing 3 changed files with 60,644 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/__tests__/mzData.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {mzData} from '..';
import {readFileSync} from 'fs';
const pathFiles = __dirname + '/../../testFiles/';
const pathFiles = __dirname + '/../../testFiles/mzData/';

describe('mzData', () => {
it('read tiny.mzData.xml', () => {
Expand All @@ -11,4 +11,14 @@ describe('mzData', () => {
expect(response.series.ms.data[0][0].length).toBe(1313);
expect(response.series.ms.data[1][0].length).toBe(43);
});

it('read real file', () => {
const data = readFileSync(pathFiles + '3-28-5.mzdata.xml');
var response = mzData(data);
expect(response.times.length).toBe(3029);
expect(response.series.ms.data.length).toBe(3029);
expect(response.series.ms.data[0][0].length).toBe(62);
expect(response.series.ms.data[1][0].length).toBe(1);
expect(response.series.ms.data[2][0].length).toBe(0);
});
});
Loading

0 comments on commit e7e314b

Please sign in to comment.