Skip to content

Commit

Permalink
chore: fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
lpatiny committed Jan 12, 2022
1 parent 06ae4ae commit 25a55b8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
20 changes: 10 additions & 10 deletions src/__tests__/chromatogram.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ describe('General methods', () => {

it('get first and last time', () => {
let chromatogram = new Chromatogram([1, 2, 3]);
expect(chromatogram.firstTime).toStrictEqual(1);
expect(chromatogram.lastTime).toStrictEqual(3);
expect(chromatogram.firstTime).toBe(1);
expect(chromatogram.lastTime).toBe(3);
});

it('get first and last time of typed array', () => {
Expand All @@ -20,8 +20,8 @@ describe('General methods', () => {
array[1] = 2;
array[2] = 3;
let chromatogram = new Chromatogram(array);
expect(chromatogram.firstTime).toStrictEqual(1);
expect(chromatogram.lastTime).toStrictEqual(3);
expect(chromatogram.firstTime).toBe(1);
expect(chromatogram.lastTime).toBe(3);
});

it('addSeries errors', () => {
Expand All @@ -39,22 +39,22 @@ describe('General methods', () => {

it('deleteSeries', () => {
let chromatogram = new Chromatogram([1, 2], { tic: [1, 2] });
expect(chromatogram.hasSeries('tic')).toStrictEqual(true);
expect(chromatogram.hasSeries('tic')).toBe(true);
expect(() => chromatogram.deleteSeries('ms')).toThrow(
'The series "ms" does not exist',
);
chromatogram.deleteSeries('tic');
expect(chromatogram.hasSeries('tic')).toStrictEqual(false);
expect(chromatogram.hasSeries('tic')).toBe(false);
});

it('Copy chromatogram', () => {
let chromatogram = new Chromatogram([1, 2], { tic: [1, 2] });
expect(chromatogram.hasSeries('tic')).toStrictEqual(true);
expect(chromatogram.hasSeries('tic')).toBe(true);
let copy = chromatogram.copy();
expect(copy.hasSeries('tic')).toStrictEqual(true);
expect(copy.hasSeries('tic')).toBe(true);
copy.deleteSeries('tic');
expect(copy.hasSeries('tic')).toStrictEqual(false);
expect(chromatogram.hasSeries('tic')).toStrictEqual(true);
expect(copy.hasSeries('tic')).toBe(false);
expect(chromatogram.hasSeries('tic')).toBe(true);
});

it('Require series', () => {
Expand Down
20 changes: 10 additions & 10 deletions src/__tests__/getKovatsConversionFunction.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ const conversionTable = [

test('from time to kovats', () => {
const time2kovats = getKovatsConversionFunction(conversionTable);
expect(time2kovats(10)).toStrictEqual(800);
expect(time2kovats(15)).toStrictEqual(850);
expect(time2kovats(20)).toStrictEqual(900);
expect(time2kovats(25)).toStrictEqual(950);
expect(time2kovats(30)).toStrictEqual(1000);
expect(time2kovats(10)).toBe(800);
expect(time2kovats(15)).toBe(850);
expect(time2kovats(20)).toBe(900);
expect(time2kovats(25)).toBe(950);
expect(time2kovats(30)).toBe(1000);
});

test('from kovats to time', () => {
const kovats2time = getKovatsConversionFunction(conversionTable, {
revert: true,
});
expect(kovats2time(800)).toStrictEqual(10);
expect(kovats2time(850)).toStrictEqual(15);
expect(kovats2time(900)).toStrictEqual(20);
expect(kovats2time(950)).toStrictEqual(25);
expect(kovats2time(1000)).toStrictEqual(30);
expect(kovats2time(800)).toBe(10);
expect(kovats2time(850)).toBe(15);
expect(kovats2time(900)).toBe(20);
expect(kovats2time(950)).toBe(25);
expect(kovats2time(1000)).toBe(30);
});
2 changes: 1 addition & 1 deletion src/__tests__/scaleAlignment.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ test('Quality and string', () => {
stringFormula: 3,
});
expect(aligned.scaleRegression.predict(30)).toBeCloseTo(20, 4);
expect(aligned.scaleRegression.toString(3)).toStrictEqual(
expect(aligned.scaleRegression.toString(3)).toBe(
'f(x) = 9.95e-17 * x^3 - 1.22e-14 * x^2 + 1.00 * x - 10.0',
);
expect(aligned.r2).toBeCloseTo(1, 4);
Expand Down

0 comments on commit 25a55b8

Please sign in to comment.