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

@@ -35,9 +35,11 @@ const zoomConfigValues = {
})),
};
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('zoomUtil', () => {
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('computeConfigValues', () => {
it('computes fixed values', () => {
test('computes fixed values', () => {
const height = 100;
const width = 100;
@@ -60,7 +62,7 @@ describe('zoomUtil', () => {
});
});
it('computes linear values', () => {
test('computes linear values', () => {
const height = 100;
const width = 100;
@@ -85,7 +87,7 @@ describe('zoomUtil', () => {
});
});
it('computes exponential values', () => {
test('computes exponential values', () => {
const height = 100;
const width = 100;
@@ -112,8 +114,9 @@ describe('zoomUtil', () => {
});
});
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('zoomConfigsToData', () => {
it('returns correct output', () => {
test('returns correct output', () => {
const result = zoomConfigsToData(zoomConfigValues);
expect(result.length).toEqual(Object.keys(zoomConfigValues).length);
@@ -121,6 +124,7 @@ describe('zoomUtil', () => {
});
});
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('toFixedConfig', () => {
const configs: ZoomConfigs['configs'] = {
width: 100,
@@ -129,11 +133,11 @@ describe('zoomUtil', () => {
};
const result = toFixedConfig(configs);
it('has correct type', () => {
test('has correct type', () => {
expect(result.type).toEqual('FIXED');
});
it('returns correct result', () => {
test('returns correct result', () => {
expect(result.values[4]).toEqual({
width: 100,
height: 100,
@@ -146,6 +150,7 @@ describe('zoomUtil', () => {
});
});
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('toLinearConfig', () => {
const configs: ZoomConfigs['configs'] = {
width: 100,
@@ -155,11 +160,11 @@ describe('zoomUtil', () => {
};
const result = toLinearConfig(configs);
it('has correct type', () => {
test('has correct type', () => {
expect(result.type).toEqual('LINEAR');
});
it('returns correct result', () => {
test('returns correct result', () => {
expect(result.values[4]).toEqual({
width: 98,
height: 98,
@@ -172,6 +177,7 @@ describe('zoomUtil', () => {
});
});
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('toExpConfig', () => {
const configs: ZoomConfigs['configs'] = {
width: 100,
@@ -181,10 +187,10 @@ describe('zoomUtil', () => {
};
// @ts-ignore
const result = toExpConfig(configs);
it('has correct type', () => {
test('has correct type', () => {
expect(result.type).toEqual('EXP');
});
it('returns correct result', () => {
test('returns correct result', () => {
expect(result.values[4]).toEqual({
width: 93,
height: 93,