Improve code coverage for cli package (#13724)

This commit is contained in:
Megha Bansal
2025-11-24 23:11:46 +05:30
committed by GitHub
parent 569c6f1dd0
commit 95693e265e
47 changed files with 5115 additions and 489 deletions

View File

@@ -0,0 +1,24 @@
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { describe, it, expect } from 'vitest';
import { lerp } from './math.js';
describe('math', () => {
describe('lerp', () => {
it.each([
[0, 10, 0, 0],
[0, 10, 1, 10],
[0, 10, 0.5, 5],
[10, 20, 0.5, 15],
[-10, 10, 0.5, 0],
[0, 10, 2, 20],
[0, 10, -1, -10],
])('lerp(%d, %d, %d) should return %d', (start, end, t, expected) => {
expect(lerp(start, end, t)).toBe(expected);
});
});
});