swimtracker-app/SwimTracker/data_processing/PeakDetection.test.js

11 lines
311 B
JavaScript

import { PeakDetectorSimple } from './PeakDetection';
describe("test PeakDetectorSimple", () => {
it("detects simple peak", () => {
let pd = new PeakDetectorSimple(40);
const result = pd.addVector([0, 10, 30, 50, 30, 50, 2, 0, 60, 0 ]);
expect(result).toEqual([3, 8]);
});
});