test(frontend): Migrate from describe/it to flat test() pattern (#35305)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Evan Rusackas
2025-09-28 11:45:33 -07:00
committed by GitHub
parent ff102aadb3
commit d62249d13f
255 changed files with 2017 additions and 1554 deletions

View File

@@ -25,6 +25,7 @@ import {
} from './valueCalculations';
import type { ColumnConfig, Entry } from '../../types';
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('valueCalculations', () => {
const mockEntries: Entry[] = [
{ time: '2023-01-03', sales: 300, price: 30 },
@@ -32,6 +33,7 @@ describe('valueCalculations', () => {
{ time: '2023-01-01', sales: 100, price: 10 },
];
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('calculateTimeValue', () => {
test('should calculate diff comparison correctly', () => {
const column: ColumnConfig = {
@@ -125,6 +127,7 @@ describe('valueCalculations', () => {
});
});
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('calculateContribution', () => {
test('should calculate contribution correctly', () => {
const result = calculateContribution(300, mockEntries);
@@ -152,6 +155,7 @@ describe('valueCalculations', () => {
});
});
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('calculateAverage', () => {
test('should calculate average correctly', () => {
const column: ColumnConfig = {
@@ -213,6 +217,7 @@ describe('valueCalculations', () => {
});
});
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('calculateCellValue', () => {
test('should route to time calculation', () => {
const column: ColumnConfig = {