Skip to content

Commit

Permalink
feat: update dependencies and deal correctly with ArrayBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
lpatiny committed May 7, 2021
1 parent 68f2a51 commit 75ba811
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
10 changes: 5 additions & 5 deletions package.json
Expand Up @@ -36,17 +36,17 @@
"test-only": "jest"
},
"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.13.8",
"eslint": "^7.22.0",
"@babel/plugin-transform-modules-commonjs": "^7.14.0",
"eslint": "^7.25.0",
"eslint-config-cheminfo": "^5.2.3",
"esm": "^3.2.25",
"jest": "^26.6.3",
"jest-matcher-deep-close-to": "^2.0.1",
"prettier": "^2.2.1",
"rollup": "^2.42.4"
"rollup": "^2.47.0"
},
"dependencies": {
"jcampconverter": "^7.8.0",
"nmr-processing": "^1.0.0"
"jcampconverter": "^8.1.1",
"nmr-processing": "^1.2.0"
}
}
18 changes: 18 additions & 0 deletions src/__tests__/getMetadata.test.js
Expand Up @@ -50,6 +50,24 @@ describe('getMetadata', function () {
});
});

it('should be FT from ArrayBuffer', function () {
let jcamp = readFileSync(`${__dirname}/data/ft.dx`);
const metadata = fromJcamp(jcamp);
expect(metadata).toStrictEqual({
dimension: 1,
nucleus: ['1H'],
isFid: false,
isFt: true,
isComplex: false,
title: '504-63-2',
experiment: '',
temperature: NaN,
frequency: 400.08260052,
type: 'NMR SPECTRUM',
expno: NaN,
});
});

it('should be cosy 2d', function () {
const metadata = fromJcamp(read('bruker-2d-ft-R-cosy.jdx'));
expect(metadata).toStrictEqual({
Expand Down

0 comments on commit 75ba811

Please sign in to comment.