From 147562dee60b659b8cb243dbf8a00f0f663a5470 Mon Sep 17 00:00:00 2001 From: rei1024 Date: Tue, 22 Oct 2024 20:42:34 +0900 Subject: [PATCH] feat: add test --- src/lib/analyzeOscillator.test.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/lib/analyzeOscillator.test.ts b/src/lib/analyzeOscillator.test.ts index ad8dd92..3250adb 100644 --- a/src/lib/analyzeOscillator.test.ts +++ b/src/lib/analyzeOscillator.test.ts @@ -34,5 +34,20 @@ describe("analyzeOscillator", () => { [2, 1, 2], [0, 2, 0], ]); + + expect( + result.frequencyMap.data.slice(15, 18).map((row) => row.slice(31, 34)) + ).toEqual([ + [0, 1, 0], + [1, 2, 1], + [0, 1, 0], + ]); + expect( + result.heatMap.data.slice(15, 18).map((row) => row.slice(31, 34)) + ).toEqual([ + [-1, 2, -1], + [2, 0, 2], + [-1, 2, -1], + ]); }); });