Skip to content

Commit

Permalink
feat: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
rei1024 committed Oct 22, 2024
1 parent dbdaed9 commit 147562d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/lib/analyzeOscillator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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],
]);
});
});

0 comments on commit 147562d

Please sign in to comment.