From 25a55b8ca0ff54d011f16e20f3b199f1862444db Mon Sep 17 00:00:00 2001 From: Luc Patiny Date: Wed, 12 Jan 2022 12:59:17 +0100 Subject: [PATCH] chore: fix eslint --- src/__tests__/chromatogram.test.js | 20 +++++++++---------- .../getKovatsConversionFunction.test.js | 20 +++++++++---------- src/__tests__/scaleAlignment.test.js | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/__tests__/chromatogram.test.js b/src/__tests__/chromatogram.test.js index eb19f07..8d85576 100644 --- a/src/__tests__/chromatogram.test.js +++ b/src/__tests__/chromatogram.test.js @@ -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', () => { @@ -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', () => { @@ -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', () => { diff --git a/src/__tests__/getKovatsConversionFunction.test.js b/src/__tests__/getKovatsConversionFunction.test.js index 51d64cd..204e130 100644 --- a/src/__tests__/getKovatsConversionFunction.test.js +++ b/src/__tests__/getKovatsConversionFunction.test.js @@ -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); }); diff --git a/src/__tests__/scaleAlignment.test.js b/src/__tests__/scaleAlignment.test.js index 6bb44ff..f623f92 100644 --- a/src/__tests__/scaleAlignment.test.js +++ b/src/__tests__/scaleAlignment.test.js @@ -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);