Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

chore(oxlint): run fixes (#11123)

Vinicius Lourenço500ce85ccbbe
diff --git a/frontend/package.json b/frontend/package.json
index 6b340d8e39..1ad522a8c8 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -212,9 +212,9 @@
"msw": "1.3.2",
"npm-run-all": "latest",
"orval": "7.18.0",
- "oxfmt": "0.46.0",
- "oxlint": "1.61.0",
- "oxlint-tsgolint": "0.21.1",
+ "oxfmt": "0.47.0",
+ "oxlint": "1.62.0",
+ "oxlint-tsgolint": "0.22.1",
"portfinder-sync": "^0.0.2",
"postcss": "8.5.6",
"postcss-scss": "4.0.9",
@@ -238,9 +238,12 @@
},
"lint-staged": {
"*.(js|jsx|ts|tsx)": [
- "oxfmt --check",
- "oxlint --quiet",
+ "oxlint --fix",
+ "oxfmt --write",
"sh scripts/typecheck-staged.sh"
+ ],
+ "*.(scss|css)": [
+ "stylelint"
]
},
"resolutions": {
diff --git a/frontend/src/api/dynamicVariables/__tests__/getFieldKeys.test.ts b/frontend/src/api/dynamicVariables/__tests__/getFieldKeys.test.ts
index a6cc5d262b..c9bc7ce928 100644
--- a/frontend/src/api/dynamicVariables/__tests__/getFieldKeys.test.ts
+++ b/frontend/src/api/dynamicVariables/__tests__/getFieldKeys.test.ts
@@ -104,7 +104,7 @@ describe('getFieldKeys API', () => {
const result = await getFieldKeys('traces');
// Verify the returned structure matches SuccessResponseV2 format
- expect(result).toEqual({
+ expect(result).toStrictEqual({
httpStatusCode: 200,
data: mockSuccessResponse.data.data,
});
diff --git a/frontend/src/api/dynamicVariables/__tests__/getFieldValues.test.ts b/frontend/src/api/dynamicVariables/__tests__/getFieldValues.test.ts
index 17bfec1bf1..042bb56429 100644
--- a/frontend/src/api/dynamicVariables/__tests__/getFieldValues.test.ts
+++ b/frontend/src/api/dynamicVariables/__tests__/getFieldValues.test.ts
@@ -199,7 +199,7 @@ describe('getFieldValues API', () => {
const result = await getFieldValues('traces', 'service.name');
// Verify the returned structure matches SuccessResponseV2 format
- expect(result).toEqual({
+ expect(result).toStrictEqual({
httpStatusCode: 200,
data: expect.objectContaining({
values: expect.any(Object),
diff --git a/frontend/src/api/interceptors.test.ts b/frontend/src/api/interceptors.test.ts
index 4ba8b2cafe..2429ab4d1b 100644
--- a/frontend/src/api/interceptors.test.ts
+++ b/frontend/src/api/interceptors.test.ts
@@ -76,10 +76,10 @@ describe('interceptorRejected', () => {
}
const mockAxiosFn = axios as unknown as jest.Mock;
- expect(mockAxiosFn.mock.calls.length).toBe(1);
+ expect(mockAxiosFn.mock.calls).toHaveLength(1);
const retryCallConfig = mockAxiosFn.mock.calls[0][0];
expect(Array.isArray(JSON.parse(retryCallConfig.data))).toBe(true);
- expect(JSON.parse(retryCallConfig.data)).toEqual(arrayPayload);
+ expect(JSON.parse(retryCallConfig.data)).toStrictEqual(arrayPayload);
});
it('should preserve object payload structure when retrying a 401 request', async () => {
@@ -112,9 +112,9 @@ describe('interceptorRejected', () => {
}
const mockAxiosFn = axios as unknown as jest.Mock;
- expect(mockAxiosFn.mock.calls.length).toBe(1);
+ expect(mockAxiosFn.mock.calls).toHaveLength(1);
const retryCallConfig = mockAxiosFn.mock.calls[0][0];
- expect(JSON.parse(retryCallConfig.data)).toEqual(objectPayload);
+ expect(JSON.parse(retryCallConfig.data)).toStrictEqual(objectPayload);
});
it('should handle undefined data gracefully when retrying', async () => {
@@ -145,7 +145,7 @@ describe('interceptorRejected', () => {
}
const mockAxiosFn = axios as unknown as jest.Mock;
- expect(mockAxiosFn.mock.calls.length).toBe(1);
+ expect(mockAxiosFn.mock.calls).toHaveLength(1);
const retryCallConfig = mockAxiosFn.mock.calls[0][0];
expect(retryCallConfig.data).toBeUndefined();
});
diff --git a/frontend/src/api/v5/queryRange/convertV5Response.test.ts b/frontend/src/api/v5/queryRange/convertV5Response.test.ts
index 9c7e0cabf2..65089e7adb 100644
--- a/frontend/src/api/v5/queryRange/convertV5Response.test.ts
+++ b/frontend/src/api/v5/queryRange/convertV5Response.test.ts
@@ -99,7 +99,7 @@ describe('convertV5ResponseToLegacy', () => {
const q = result.payload.data.result[0];
expect(q.queryName).toBe('A');
expect(q.legend).toBe('{{service.name}}');
- expect(q.series?.[0]).toEqual(
+ expect(q.series?.[0]).toStrictEqual(
expect.objectContaining({
labels: { 'service.name': 'adservice' },
values: [
@@ -186,7 +186,7 @@ describe('convertV5ResponseToLegacy', () => {
expect(result.payload.data.resultType).toBe('scalar');
const [tableEntry] = result.payload.data.result;
- expect(tableEntry.table?.columns).toEqual([
+ expect(tableEntry.table?.columns).toStrictEqual([
{
name: 'service.name',
queryName: 'A',
@@ -202,7 +202,7 @@ describe('convertV5ResponseToLegacy', () => {
},
{ name: 'F1', queryName: 'F1', isValueColumn: true, id: 'F1' },
]);
- expect(tableEntry.table?.rows?.[0]).toEqual({
+ expect(tableEntry.table?.rows?.[0]).toStrictEqual({
data: {
'service.name': 'adservice',
'A.count()': 606,
@@ -257,7 +257,7 @@ describe('convertV5ResponseToLegacy', () => {
expect(result.payload.data.resultType).toBe('scalar');
const [tableEntry] = result.payload.data.result;
- expect(tableEntry.table?.columns).toEqual([
+ expect(tableEntry.table?.columns).toStrictEqual([
{
name: 'service.name',
queryName: 'A',
@@ -267,7 +267,7 @@ describe('convertV5ResponseToLegacy', () => {
// Single aggregation: name resolves to legend, id resolves to queryName
{ name: '{{service.name}}', queryName: 'A', isValueColumn: true, id: 'A' },
]);
- expect(tableEntry.table?.rows?.[0]).toEqual({
+ expect(tableEntry.table?.rows?.[0]).toStrictEqual({
data: {
'service.name': 'adservice',
A: 580,
diff --git a/frontend/src/api/v5/queryRange/prepareQueryRangePayloadV5.test.ts b/frontend/src/api/v5/queryRange/prepareQueryRangePayloadV5.test.ts
index 773946d8d5..59cf631846 100644
--- a/frontend/src/api/v5/queryRange/prepareQueryRangePayloadV5.test.ts
+++ b/frontend/src/api/v5/queryRange/prepareQueryRangePayloadV5.test.ts
@@ -104,7 +104,7 @@ describe('prepareQueryRangePayloadV5', () => {
const result = prepareQueryRangePayloadV5(props);
- expect(result).toEqual(
+ expect(result).toStrictEqual(
expect.objectContaining({
legendMap: { A: 'Legend A', F1: 'Formula Legend' },
queryPayload: expect.objectContaining({
@@ -154,7 +154,10 @@ describe('prepareQueryRangePayloadV5', () => {
);
// Legend map combines builder and formulas
- expect(result.legendMap).toEqual({ A: 'Legend A', F1: 'Formula Legend' });
+ expect(result.legendMap).toStrictEqual({
+ A: 'Legend A',
+ F1: 'Formula Legend',
+ });
const payload: QueryRangePayloadV5 = result.queryPayload;
@@ -166,10 +169,10 @@ describe('prepareQueryRangePayloadV5', () => {
expect(payload.formatOptions?.fillGaps).toBe(true);
// Variables mapped as { key: { value } }
- expect(payload.variables).toEqual({
- svc: { value: 'api' },
- count: { value: 5 },
- flag: { value: true },
+ expect(payload.variables).toStrictEqual({
+ svc: { value: 'api', type: undefined },
+ count: { value: 5, type: undefined },
+ flag: { value: true, type: undefined },
});
// Queries include one builder_query and one builder_formula
@@ -226,7 +229,7 @@ describe('prepareQueryRangePayloadV5', () => {
const result = prepareQueryRangePayloadV5(props);
- expect(result).toEqual(
+ expect(result).toStrictEqual(
expect.objectContaining({
legendMap: { A: 'LP' },
queryPayload: expect.objectContaining({
@@ -255,7 +258,7 @@ describe('prepareQueryRangePayloadV5', () => {
}),
);
- expect(result.legendMap).toEqual({ A: 'LP' });
+ expect(result.legendMap).toStrictEqual({ A: 'LP' });
const payload: QueryRangePayloadV5 = result.queryPayload;
expect(payload.requestType).toBe('time_series');
@@ -296,7 +299,7 @@ describe('prepareQueryRangePayloadV5', () => {
const result = prepareQueryRangePayloadV5(props);
- expect(result).toEqual(
+ expect(result).toStrictEqual(
expect.objectContaining({
legendMap: { Q: 'LC' },
queryPayload: expect.objectContaining({
@@ -324,7 +327,7 @@ describe('prepareQueryRangePayloadV5', () => {
}),
);
- expect(result.legendMap).toEqual({ Q: 'LC' });
+ expect(result.legendMap).toStrictEqual({ Q: 'LC' });
const payload: QueryRangePayloadV5 = result.queryPayload;
expect(payload.requestType).toBe('scalar');
@@ -353,7 +356,7 @@ describe('prepareQueryRangePayloadV5', () => {
const result = prepareQueryRangePayloadV5(props);
- expect(result).toEqual(
+ expect(result).toStrictEqual(
expect.objectContaining({
legendMap: {},
queryPayload: expect.objectContaining({
@@ -397,7 +400,7 @@ describe('prepareQueryRangePayloadV5', () => {
const result = prepareQueryRangePayloadV5(props);
- expect(result).toEqual(
+ expect(result).toStrictEqual(
expect.objectContaining({
legendMap: { A: 'Legend A' },
queryPayload: expect.objectContaining({
@@ -471,7 +474,7 @@ describe('prepareQueryRangePayloadV5', () => {
const result = prepareQueryRangePayloadV5(props);
- expect(result).toEqual(
+ expect(result).toStrictEqual(
expect.objectContaining({
legendMap: { A: 'Legend A' },
queryPayload: expect.objectContaining({
@@ -585,7 +588,7 @@ describe('prepareQueryRangePayloadV5', () => {
const result = prepareQueryRangePayloadV5(props);
- expect(result).toEqual(
+ expect(result).toStrictEqual(
expect.objectContaining({
legendMap: { A: '{{service.name}}' },
queryPayload: expect.objectContaining({
@@ -684,7 +687,7 @@ describe('prepareQueryRangePayloadV5', () => {
const result = prepareQueryRangePayloadV5(props);
- expect(result.legendMap).toEqual({ A: 'Legend A' });
+ expect(result.legendMap).toStrictEqual({ A: 'Legend A' });
expect(result.queryPayload.compositeQuery.queries).toHaveLength(1);
const builderQuery = result.queryPayload.compositeQuery.queries.find(
@@ -694,7 +697,7 @@ describe('prepareQueryRangePayloadV5', () => {
expect(logSpec.name).toBe('A');
expect(logSpec.signal).toBe('logs');
- expect(logSpec.filter).toEqual({
+ expect(logSpec.filter).toStrictEqual({
expression:
"service.name = 'payment-service' AND http.status_code >= 400 AND message contains 'error'",
});
@@ -731,7 +734,9 @@ describe('prepareQueryRangePayloadV5', () => {
(q) => q.type === 'builder_query',
) as QueryEnvelope;
const logSpec = builderQuery.spec as LogBuilderQuery;
- expect(logSpec.filter).toEqual({ expression: 'http.status_code >= 500' });
+ expect(logSpec.filter).toStrictEqual({
+ expression: 'http.status_code >= 500',
+ });
});
it('derives expression from filters when filter is undefined', () => {
@@ -775,7 +780,9 @@ describe('prepareQueryRangePayloadV5', () => {
(q) => q.type === 'builder_query',
) as QueryEnvelope;
const logSpec = builderQuery.spec as LogBuilderQuery;
- expect(logSpec.filter).toEqual({ expression: "service.name = 'checkout'" });
+ expect(logSpec.filter).toStrictEqual({
+ expression: "service.name = 'checkout'",
+ });
});
it('prefers filter.expression over filters when both are present', () => {
@@ -819,7 +826,9 @@ describe('prepareQueryRangePayloadV5', () => {
(q) => q.type === 'builder_query',
) as QueryEnvelope;
const logSpec = builderQuery.spec as LogBuilderQuery;
- expect(logSpec.filter).toEqual({ expression: "service.name = 'frontend'" });
+ expect(logSpec.filter).toStrictEqual({
+ expression: "service.name = 'frontend'",
+ });
});
it('returns empty expression when neither filter nor filters provided', () => {
@@ -853,7 +862,7 @@ describe('prepareQueryRangePayloadV5', () => {
(q) => q.type === 'builder_query',
) as QueryEnvelope;
const logSpec = builderQuery.spec as LogBuilderQuery;
- expect(logSpec.filter).toEqual({ expression: '' });
+ expect(logSpec.filter).toStrictEqual({ expression: '' });
});
it('returns empty expression when filters provided with empty items', () => {
@@ -887,6 +896,6 @@ describe('prepareQueryRangePayloadV5', () => {
(q) => q.type === 'builder_query',
) as QueryEnvelope;
const logSpec = builderQuery.spec as LogBuilderQuery;
- expect(logSpec.filter).toEqual({ expression: '' });
+ expect(logSpec.filter).toStrictEqual({ expression: '' });
});
});
diff --git a/frontend/src/components/DownloadOptionsMenu/DownloadOptionsMenu.test.tsx b/frontend/src/components/DownloadOptionsMenu/DownloadOptionsMenu.test.tsx
index fa5b202362..5706190637 100644
--- a/frontend/src/components/DownloadOptionsMenu/DownloadOptionsMenu.test.tsx
+++ b/frontend/src/components/DownloadOptionsMenu/DownloadOptionsMenu.test.tsx
@@ -213,7 +213,7 @@ describe.each([
const callArgs = mockDownloadExportData.mock.calls[0][0];
const query = callArgs.body.compositeQuery.queries[0];
expect(query.spec.groupBy).toBeUndefined();
- expect(query.spec.having).toEqual({ expression: '' });
+ expect(query.spec.having).toStrictEqual({ expression: '' });
});
});
@@ -238,7 +238,7 @@ describe.each([
expect(mockDownloadExportData).toHaveBeenCalledTimes(1);
const callArgs = mockDownloadExportData.mock.calls[0][0];
const query = callArgs.body.compositeQuery.queries[0];
- expect(query.spec.selectFields).toEqual([
+ expect(query.spec.selectFields).toStrictEqual([
expect.objectContaining({
name: 'http.status',
fieldDataType: 'int64',
diff --git a/frontend/src/components/DraggableTableRow/tests/utils.test.ts b/frontend/src/components/DraggableTableRow/tests/utils.test.ts
index 80854944c7..66ada095c9 100644
--- a/frontend/src/components/DraggableTableRow/tests/utils.test.ts
+++ b/frontend/src/components/DraggableTableRow/tests/utils.test.ts
@@ -6,39 +6,39 @@ jest.mock('react-dnd', () => ({
}));
describe('Utils testing of DraggableTableRow component', () => {
- test('Should dropHandler return true', () => {
+ it('Should dropHandler return true', () => {
const monitor = {
isOver: jest.fn().mockReturnValueOnce(true),
} as never;
const dropDataTruthy = dropHandler(monitor);
- expect(dropDataTruthy).toEqual({ isOver: true });
+ expect(dropDataTruthy).toStrictEqual({ isOver: true });
});
- test('Should dropHandler return false', () => {
+ it('Should dropHandler return false', () => {
const monitor = {
isOver: jest.fn().mockReturnValueOnce(false),
} as never;
const dropDataFalsy = dropHandler(monitor);
- expect(dropDataFalsy).toEqual({ isOver: false });
+ expect(dropDataFalsy).toStrictEqual({ isOver: false });
});
- test('Should dragHandler return true', () => {
+ it('Should dragHandler return true', () => {
const monitor = {
isDragging: jest.fn().mockReturnValueOnce(true),
} as never;
const dragDataTruthy = dragHandler(monitor);
- expect(dragDataTruthy).toEqual({ isDragging: true });
+ expect(dragDataTruthy).toStrictEqual({ isDragging: true });
});
- test('Should dragHandler return false', () => {
+ it('Should dragHandler return false', () => {
const monitor = {
isDragging: jest.fn().mockReturnValueOnce(false),
} as never;
const dragDataFalsy = dragHandler(monitor);
- expect(dragDataFalsy).toEqual({ isDragging: false });
+ expect(dragDataFalsy).toStrictEqual({ isDragging: false });
});
});
diff --git a/frontend/src/components/EditMemberDrawer/__tests__/EditMemberDrawer.test.tsx b/frontend/src/components/EditMemberDrawer/__tests__/EditMemberDrawer.test.tsx
index 29a5d21b2c..9eb7e279ec 100644
--- a/frontend/src/components/EditMemberDrawer/__tests__/EditMemberDrawer.test.tsx
+++ b/frontend/src/components/EditMemberDrawer/__tests__/EditMemberDrawer.test.tsx
@@ -361,9 +361,9 @@ describe('EditMemberDrawer', () => {
await user.click(screen.getByRole('button', { name: /delete member/i }));
- expect(
- await screen.findByText(/are you sure you want to delete/i),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText(/are you sure you want to delete/i),
+ ).resolves.toBeInTheDocument();
const confirmBtns = screen.getAllByRole('button', { name: /delete member/i });
await user.click(confirmBtns[confirmBtns.length - 1]);
@@ -441,9 +441,9 @@ describe('EditMemberDrawer', () => {
await user.click(screen.getByRole('button', { name: /revoke invite/i }));
- expect(
- await screen.findByText(/Are you sure you want to revoke the invite/i),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText(/Are you sure you want to revoke the invite/i),
+ ).resolves.toBeInTheDocument();
const confirmBtns = screen.getAllByRole('button', { name: /revoke invite/i });
await user.click(confirmBtns[confirmBtns.length - 1]);
diff --git a/frontend/src/components/Graph/Plugin/Legend.ts b/frontend/src/components/Graph/Plugin/Legend.ts
index 0dfc8728f6..d8f4f05e77 100644
--- a/frontend/src/components/Graph/Plugin/Legend.ts
+++ b/frontend/src/components/Graph/Plugin/Legend.ts
@@ -64,7 +64,7 @@ export const legend = (id: string, isLonger: boolean): Plugin<ChartType> => ({
// li.style.marginTop = '5px';
li.onclick = (): void => {
- // @ts-ignore
+ // @ts-expect-error
const { type } = chart.config;
if (type === 'pie' || type === 'doughnut') {
// Pie and doughnut charts only have a single dataset and visibility is per item
diff --git a/frontend/src/components/Graph/__tests__/xAxisConfig.test.ts b/frontend/src/components/Graph/__tests__/xAxisConfig.test.ts
index b26a2437c1..e872f75899 100644
--- a/frontend/src/components/Graph/__tests__/xAxisConfig.test.ts
+++ b/frontend/src/components/Graph/__tests__/xAxisConfig.test.ts
@@ -9,65 +9,65 @@ describe('xAxisConfig for Chart', () => {
const start = dayjs();
const end = start.add(10, 'millisecond');
- expect(convertTimeRange(start.valueOf(), end.valueOf()).unitName).toEqual(
- TIME_UNITS.millisecond,
- );
+ expect(
+ convertTimeRange(start.valueOf(), end.valueOf()).unitName,
+ ).toStrictEqual(TIME_UNITS.millisecond);
}
{
const start = dayjs();
const end = start.add(10, 'second');
- expect(convertTimeRange(start.valueOf(), end.valueOf()).unitName).toEqual(
- TIME_UNITS.second,
- );
+ expect(
+ convertTimeRange(start.valueOf(), end.valueOf()).unitName,
+ ).toStrictEqual(TIME_UNITS.second);
}
{
const start = dayjs();
const end = start.add(10, 'minute');
- expect(convertTimeRange(start.valueOf(), end.valueOf()).unitName).toEqual(
- TIME_UNITS.minute,
- );
+ expect(
+ convertTimeRange(start.valueOf(), end.valueOf()).unitName,
+ ).toStrictEqual(TIME_UNITS.minute);
}
{
const start = dayjs();
const end = start.add(10, 'hour');
- expect(convertTimeRange(start.valueOf(), end.valueOf()).unitName).toEqual(
- TIME_UNITS.hour,
- );
+ expect(
+ convertTimeRange(start.valueOf(), end.valueOf()).unitName,
+ ).toStrictEqual(TIME_UNITS.hour);
}
{
const start = dayjs();
const end = start.add(10, 'day');
- expect(convertTimeRange(start.valueOf(), end.valueOf()).unitName).toEqual(
- TIME_UNITS.day,
- );
+ expect(
+ convertTimeRange(start.valueOf(), end.valueOf()).unitName,
+ ).toStrictEqual(TIME_UNITS.day);
}
{
const start = dayjs();
const end = start.add(10, 'week');
- expect(convertTimeRange(start.valueOf(), end.valueOf()).unitName).toEqual(
- TIME_UNITS.week,
- );
+ expect(
+ convertTimeRange(start.valueOf(), end.valueOf()).unitName,
+ ).toStrictEqual(TIME_UNITS.week);
}
{
const start = dayjs();
const end = start.add(10, 'month');
- expect(convertTimeRange(start.valueOf(), end.valueOf()).unitName).toEqual(
- TIME_UNITS.month,
- );
+ expect(
+ convertTimeRange(start.valueOf(), end.valueOf()).unitName,
+ ).toStrictEqual(TIME_UNITS.month);
}
{
const start = dayjs();
const end = start.add(10, 'year');
- expect(convertTimeRange(start.valueOf(), end.valueOf()).unitName).toEqual(
- TIME_UNITS.year,
- );
+ expect(
+ convertTimeRange(start.valueOf(), end.valueOf()).unitName,
+ ).toStrictEqual(TIME_UNITS.year);
}
});
});
diff --git a/frontend/src/components/Graph/__tests__/yAxisConfig.test.ts b/frontend/src/components/Graph/__tests__/yAxisConfig.test.ts
index 6b56ee40d4..27b1b0d5f8 100644
--- a/frontend/src/components/Graph/__tests__/yAxisConfig.test.ts
+++ b/frontend/src/components/Graph/__tests__/yAxisConfig.test.ts
@@ -7,7 +7,7 @@ const testFullPrecisionGetYAxisFormattedValue = (
): string => getYAxisFormattedValue(value, format, PrecisionOptionsEnum.FULL);
describe('getYAxisFormattedValue - none (full precision legacy assertions)', () => {
- test('large integers and decimals', () => {
+ it('large integers and decimals', () => {
expect(testFullPrecisionGetYAxisFormattedValue('250034', 'none')).toBe(
'250034',
);
@@ -22,7 +22,7 @@ describe('getYAxisFormattedValue - none (full precision legacy assertions)', ()
);
});
- test('preserves leading zeros after decimal until first non-zero', () => {
+ it('preserves leading zeros after decimal until first non-zero', () => {
expect(testFullPrecisionGetYAxisFormattedValue('1.0000234', 'none')).toBe(
'1.0000234',
);
@@ -31,7 +31,7 @@ describe('getYAxisFormattedValue - none (full precision legacy assertions)', ()
);
});
- test('trims to three significant decimals and removes trailing zeros', () => {
+ it('trims to three significant decimals and removes trailing zeros', () => {
expect(
testFullPrecisionGetYAxisFormattedValue('0.000000250034', 'none'),
).toBe('0.000000250034');
@@ -55,7 +55,7 @@ describe('getYAxisFormattedValue - none (full precision legacy assertions)', ()
).toBe('0.00000025');
});
- test('whole numbers normalize', () => {
+ it('whole numbers normalize', () => {
expect(testFullPrecisionGetYAxisFormattedValue('1000', 'none')).toBe('1000');
expect(testFullPrecisionGetYAxisFormattedValue('99.5458', 'none')).toBe(
'99.5458',
@@ -68,7 +68,7 @@ describe('getYAxisFormattedValue - none (full precision legacy assertions)', ()
);
});
- test('strip redundant decimal zeros', () => {
+ it('strip redundant decimal zeros', () => {
expect(testFullPrecisionGetYAxisFormattedValue('1000.000', 'none')).toBe(
'1000',
);
@@ -78,7 +78,7 @@ describe('getYAxisFormattedValue - none (full precision legacy assertions)', ()
expect(testFullPrecisionGetYAxisFormattedValue('1.000', 'none')).toBe('1');
});
- test('edge values', () => {
+ it('edge values', () => {
expect(testFullPrecisionGetYAxisFormattedValue('0', 'none')).toBe('0');
expect(testFullPrecisionGetYAxisFormattedValue('-0', 'none')).toBe('0');
expect(testFullPrecisionGetYAxisFormattedValue('Infinity', 'none')).toBe('∞');
@@ -92,7 +92,7 @@ describe('getYAxisFormattedValue - none (full precision legacy assertions)', ()
expect(testFullPrecisionGetYAxisFormattedValue('abc123', 'none')).toBe('NaN');
});
- test('small decimals keep precision as-is', () => {
+ it('small decimals keep precision as-is', () => {
expect(testFullPrecisionGetYAxisFormattedValue('0.0001', 'none')).toBe(
'0.0001',
);
@@ -104,7 +104,7 @@ describe('getYAxisFormattedValue - none (full precision legacy assertions)', ()
);
});
- test('simple decimals preserved', () => {
+ it('simple decimals preserved', () => {
expect(testFullPrecisionGetYAxisFormattedValue('0.1', 'none')).toBe('0.1');
expect(testFullPrecisionGetYAxisFormattedValue('0.2', 'none')).toBe('0.2');
expect(testFullPrecisionGetYAxisFormattedValue('0.3', 'none')).toBe('0.3');
@@ -115,7 +115,7 @@ describe('getYAxisFormattedValue - none (full precision legacy assertions)', ()
});
describe('getYAxisFormattedValue - units (full precision legacy assertions)', () => {
- test('ms', () => {
+ it('ms', () => {
expect(testFullPrecisionGetYAxisFormattedValue('1500', 'ms')).toBe('1.5 s');
expect(testFullPrecisionGetYAxisFormattedValue('500', 'ms')).toBe('500 ms');
expect(testFullPrecisionGetYAxisFormattedValue('60000', 'ms')).toBe('1 min');
@@ -127,19 +127,19 @@ describe('getYAxisFormattedValue - units (full precision legacy assertions)', ()
);
});
- test('s', () => {
+ it('s', () => {
expect(testFullPrecisionGetYAxisFormattedValue('90', 's')).toBe('1.5 mins');
expect(testFullPrecisionGetYAxisFormattedValue('30', 's')).toBe('30 s');
expect(testFullPrecisionGetYAxisFormattedValue('3600', 's')).toBe('1 hour');
});
- test('m', () => {
+ it('m', () => {
expect(testFullPrecisionGetYAxisFormattedValue('90', 'm')).toBe('1.5 hours');
expect(testFullPrecisionGetYAxisFormattedValue('30', 'm')).toBe('30 min');
expect(testFullPrecisionGetYAxisFormattedValue('1440', 'm')).toBe('1 day');
});
- test('bytes', () => {
+ it('bytes', () => {
expect(testFullPrecisionGetYAxisFormattedValue('1024', 'bytes')).toBe(
'1 KiB',
);
@@ -149,7 +149,7 @@ describe('getYAxisFormattedValue - units (full precision legacy assertions)', ()
);
});
- test('mbytes', () => {
+ it('mbytes', () => {
expect(testFullPrecisionGetYAxisFormattedValue('1024', 'mbytes')).toBe(
'1 GiB',
);
@@ -161,7 +161,7 @@ describe('getYAxisFormattedValue - units (full precision legacy assertions)', ()
);
});
- test('kbytes', () => {
+ it('kbytes', () => {
expect(testFullPrecisionGetYAxisFormattedValue('1024', 'kbytes')).toBe(
'1 MiB',
);
@@ -173,7 +173,7 @@ describe('getYAxisFormattedValue - units (full precision legacy assertions)', ()
);
});
- test('short', () => {
+ it('short', () => {
expect(testFullPrecisionGetYAxisFormattedValue('1000', 'short')).toBe('1 K');
expect(testFullPrecisionGetYAxisFormattedValue('1500', 'short')).toBe(
'1.5 K',
@@ -201,7 +201,7 @@ describe('getYAxisFormattedValue - units (full precision legacy assertions)', ()
);
});
- test('percent', () => {
+ it('percent', () => {
expect(testFullPrecisionGetYAxisFormattedValue('0.15', 'percent')).toBe(
'0.15%',
);
@@ -235,7 +235,7 @@ describe('getYAxisFormattedValue - units (full precision legacy assertions)', ()
).toBe('1.005555555595959%');
});
- test('ratio', () => {
+ it('ratio', () => {
expect(testFullPrecisionGetYAxisFormattedValue('0.5', 'ratio')).toBe(
'0.5 ratio',
);
@@ -247,7 +247,7 @@ describe('getYAxisFormattedValue - units (full precision legacy assertions)', ()
);
});
- test('temperature units', () => {
+ it('temperature units', () => {
expect(testFullPrecisionGetYAxisFormattedValue('25', 'celsius')).toBe(
'25 °C',
);
@@ -267,13 +267,13 @@ describe('getYAxisFormattedValue - units (full precision legacy assertions)', ()
);
});
- test('ms edge cases', () => {
+ it('ms edge cases', () => {
expect(testFullPrecisionGetYAxisFormattedValue('0', 'ms')).toBe('0 ms');
expect(testFullPrecisionGetYAxisFormattedValue('-1500', 'ms')).toBe('-1.5 s');
expect(testFullPrecisionGetYAxisFormattedValue('Infinity', 'ms')).toBe('∞');
});
- test('bytes edge cases', () => {
+ it('bytes edge cases', () => {
expect(testFullPrecisionGetYAxisFormattedValue('0', 'bytes')).toBe('0 B');
expect(testFullPrecisionGetYAxisFormattedValue('-1024', 'bytes')).toBe(
'-1 KiB',
@@ -282,7 +282,7 @@ describe('getYAxisFormattedValue - units (full precision legacy assertions)', ()
});
describe('getYAxisFormattedValue - precision option tests', () => {
- test('precision 0 drops decimal part', () => {
+ it('precision 0 drops decimal part', () => {
expect(getYAxisFormattedValue('1.2345', 'none', 0)).toBe('1');
expect(getYAxisFormattedValue('0.9999', 'none', 0)).toBe('0');
expect(getYAxisFormattedValue('12345.6789', 'none', 0)).toBe('12345');
@@ -294,7 +294,7 @@ describe('getYAxisFormattedValue - precision option tests', () => {
// with unit
expect(getYAxisFormattedValue('4353.81', 'ms', 0)).toBe('4 s');
});
- test('precision 1,2,3,4 decimals', () => {
+ it('precision 1,2,3,4 decimals', () => {
expect(getYAxisFormattedValue('1.2345', 'none', 1)).toBe('1.2');
expect(getYAxisFormattedValue('1.2345', 'none', 2)).toBe('1.23');
expect(getYAxisFormattedValue('1.2345', 'none', 3)).toBe('1.234');
@@ -345,7 +345,7 @@ describe('getYAxisFormattedValue - precision option tests', () => {
expect(getYAxisFormattedValue('0.123456', 'percent', 4)).toBe('0.1235%'); // approximation
});
- test('precision full uses up to DEFAULT_SIGNIFICANT_DIGITS significant digits', () => {
+ it('precision full uses up to DEFAULT_SIGNIFICANT_DIGITS significant digits', () => {
expect(
getYAxisFormattedValue(
'0.00002625429914148441',
diff --git a/frontend/src/components/InviteMembersModal/__tests__/InviteMembersModal.test.tsx b/frontend/src/components/InviteMembersModal/__tests__/InviteMembersModal.test.tsx
index 558b1d9151..f8192c2a8f 100644
--- a/frontend/src/components/InviteMembersModal/__tests__/InviteMembersModal.test.tsx
+++ b/frontend/src/components/InviteMembersModal/__tests__/InviteMembersModal.test.tsx
@@ -90,11 +90,11 @@ describe('InviteMembersModal', () => {
screen.getByRole('button', { name: /invite team members/i }),
);
- expect(
- await screen.findByText(
+ await expect(
+ screen.findByText(
'Please enter valid emails and select roles for team members',
),
- ).toBeInTheDocument();
+ ).resolves.toBeInTheDocument();
});
it('shows email-only message when email is invalid but role is selected', async () => {
@@ -112,9 +112,9 @@ describe('InviteMembersModal', () => {
screen.getByRole('button', { name: /invite team members/i }),
);
- expect(
- await screen.findByText('Please enter valid emails for team members'),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText('Please enter valid emails for team members'),
+ ).resolves.toBeInTheDocument();
});
it('shows role-only message when email is valid but role is missing', async () => {
@@ -130,9 +130,9 @@ describe('InviteMembersModal', () => {
screen.getByRole('button', { name: /invite team members/i }),
);
- expect(
- await screen.findByText('Please select roles for team members'),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText('Please select roles for team members'),
+ ).resolves.toBeInTheDocument();
});
});
diff --git a/frontend/src/components/Logs/LogStateIndicator/utils.test.ts b/frontend/src/components/Logs/LogStateIndicator/utils.test.ts
index bad5147972..e2e062365e 100644
--- a/frontend/src/components/Logs/LogStateIndicator/utils.test.ts
+++ b/frontend/src/components/Logs/LogStateIndicator/utils.test.ts
@@ -27,7 +27,7 @@ describe('getLogIndicatorType', () => {
expect(getLogIndicatorType(log)).toBe('TRACE');
});
- it('severity_text should be used when severity_number is absent ', () => {
+ it('severity_text should be used when severity_number is absent', () => {
const log = {
date: '2024-02-29T12:34:46Z',
timestamp: 1646115296,
diff --git a/frontend/src/components/LogsFormatOptionsMenu/LogsFormatOptionsMenu.tsx b/frontend/src/components/LogsFormatOptionsMenu/LogsFormatOptionsMenu.tsx
index bac05ae4cd..72d9ce13d5 100644
--- a/frontend/src/components/LogsFormatOptionsMenu/LogsFormatOptionsMenu.tsx
+++ b/frontend/src/components/LogsFormatOptionsMenu/LogsFormatOptionsMenu.tsx
@@ -75,7 +75,7 @@ function OptionsMenu({
};
const handleSearchValueChange = useDebouncedFn((event): void => {
- // @ts-ignore
+ // @ts-expect-error
const value = event?.target?.value || '';
if (addColumn && addColumn?.onSearch) {
diff --git a/frontend/src/components/MarkdownRenderer/MarkdownRenderer.tsx b/frontend/src/components/MarkdownRenderer/MarkdownRenderer.tsx
index 1f8f0465b5..48f22e5575 100644
--- a/frontend/src/components/MarkdownRenderer/MarkdownRenderer.tsx
+++ b/frontend/src/components/MarkdownRenderer/MarkdownRenderer.tsx
@@ -50,7 +50,7 @@ function Code({
const match = /language-(\w+)/.exec(className || '');
return !inline && match ? (
<SyntaxHighlighter
- // @ts-ignore
+ // @ts-expect-error
style={a11yDark}
language={match[1]}
PreTag="div"
@@ -115,7 +115,7 @@ function MarkdownRenderer({
className={className}
rehypePlugins={[rehypeRaw as any]}
components={{
- // @ts-ignore
+ // @ts-expect-error
a: Link,
pre: ({ children }) =>
Pre({
diff --git a/frontend/src/components/NewSelect/__test__/CustomMultiSelect.comprehensive.test.tsx b/frontend/src/components/NewSelect/__test__/CustomMultiSelect.comprehensive.test.tsx
index a77abf2ddd..6b29585308 100644
--- a/frontend/src/components/NewSelect/__test__/CustomMultiSelect.comprehensive.test.tsx
+++ b/frontend/src/components/NewSelect/__test__/CustomMultiSelect.comprehensive.test.tsx
@@ -61,7 +61,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
// ===== 1. CUSTOM VALUES SUPPORT =====
describe('Custom Values Support (CS)', () => {
- test('CS-01: Custom values persist in selected state', async () => {
+ it('CS-01: Custom values persist in selected state', async () => {
const { rerender } = renderWithVirtuoso(
<CustomMultiSelect
options={mockOptions}
@@ -87,7 +87,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
expect(screen.getByText('another-custom')).toBeInTheDocument();
});
- test('CS-02: Partial matches create custom values', async () => {
+ it('CS-02: Partial matches create custom values', async () => {
renderWithVirtuoso(
<CustomMultiSelect
options={mockOptions}
@@ -129,7 +129,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
expect(combobox).toBeInTheDocument();
});
- test('CS-03: Exact match filtering behavior', async () => {
+ it('CS-03: Exact match filtering behavior', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} />,
);
@@ -176,7 +176,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
});
});
- test('CS-04: Search filtering with "end" pattern', async () => {
+ it('CS-04: Search filtering with "end" pattern', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} />,
);
@@ -234,7 +234,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
});
});
- test('CS-05: Comma-separated values behavior', async () => {
+ it('CS-05: Comma-separated values behavior', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} />,
);
@@ -281,7 +281,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
// ===== 2. SEARCH AND FILTERING =====
describe('Search and Filtering (SF)', () => {
- test('SF-01: Selected values pushed to top', async () => {
+ it('SF-01: Selected values pushed to top', async () => {
renderWithVirtuoso(
<CustomMultiSelect
options={mockOptions}
@@ -305,7 +305,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
});
});
- test('SF-02: Filtering with search text', async () => {
+ it('SF-02: Filtering with search text', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} />,
);
@@ -350,7 +350,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
});
});
- test('SF-03: Highlighting search matches', async () => {
+ it('SF-03: Highlighting search matches', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} />,
);
@@ -381,7 +381,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
});
});
- test('SF-04: Search with no results', async () => {
+ it('SF-04: Search with no results', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} />,
);
@@ -424,7 +424,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
// ===== 3. KEYBOARD NAVIGATION =====
describe('Keyboard Navigation (KN)', () => {
- test('KN-01: Arrow key navigation in dropdown', async () => {
+ it('KN-01: Arrow key navigation in dropdown', async () => {
renderWithVirtuoso(
<CustomMultiSelect
options={mockOptions}
@@ -465,7 +465,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
});
});
- test('KN-02: Tab navigation to dropdown', async () => {
+ it('KN-02: Tab navigation to dropdown', async () => {
renderWithVirtuoso(
<div>
<input data-testid="prev-input" />
@@ -515,7 +515,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
});
});
- test('KN-03: Enter selection in dropdown', async () => {
+ it('KN-03: Enter selection in dropdown', async () => {
renderWithVirtuoso(
<CustomMultiSelect
options={mockOptions}
@@ -540,7 +540,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
expect(mockOnChange).toHaveBeenCalledWith(['frontend'], ['frontend']);
});
- test('KN-04: Chip deletion with keyboard', async () => {
+ it('KN-04: Chip deletion with keyboard', async () => {
renderWithVirtuoso(
<CustomMultiSelect
options={mockOptions}
@@ -586,7 +586,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
// ===== 5. UI/UX BEHAVIORS =====
describe('UI/UX Behaviors (UI)', () => {
- test('UI-01: Loading state does not block interaction', async () => {
+ it('UI-01: Loading state does not block interaction', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} loading />,
);
@@ -603,7 +603,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
});
});
- test('UI-02: Component remains editable in all states', async () => {
+ it('UI-02: Component remains editable in all states', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} loading />,
);
@@ -634,7 +634,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
expect(combobox).not.toBeDisabled();
});
- test('UI-03: Toggle/Only labels in dropdown', async () => {
+ it('UI-03: Toggle/Only labels in dropdown', async () => {
renderWithVirtuoso(
<CustomMultiSelect
options={mockOptions}
@@ -656,7 +656,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
});
});
- test('UI-04: Should display values with loading info at bottom', async () => {
+ it('UI-04: Should display values with loading info at bottom', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} loading />,
);
@@ -677,7 +677,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
});
});
- test('UI-05: Error state display in footer', async () => {
+ it('UI-05: Error state display in footer', async () => {
renderWithVirtuoso(
<CustomMultiSelect
options={mockOptions}
@@ -696,7 +696,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
});
});
- test('UI-06: No data state display', async () => {
+ it('UI-06: No data state display', async () => {
renderWithVirtuoso(
<CustomMultiSelect
options={[]}
@@ -716,7 +716,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
// ===== 6. CLEAR ACTIONS =====
describe('Clear Actions (CA)', () => {
- test('CA-01: Ctrl+A selects all chips', async () => {
+ it('CA-01: Ctrl+A selects all chips', async () => {
renderWithVirtuoso(
<CustomMultiSelect
options={mockOptions}
@@ -760,7 +760,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
});
});
- test('CA-02: Clear icon removes all selections', async () => {
+ it('CA-02: Clear icon removes all selections', async () => {
renderWithVirtuoso(
<CustomMultiSelect
options={mockOptions}
@@ -777,7 +777,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
}
});
- test('CA-03: Individual chip removal', async () => {
+ it('CA-03: Individual chip removal', async () => {
renderWithVirtuoso(
<CustomMultiSelect
options={mockOptions}
@@ -790,7 +790,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
const removeButtons = document.querySelectorAll(
'.ant-select-selection-item-remove',
);
- expect(removeButtons.length).toBe(2);
+ expect(removeButtons).toHaveLength(2);
await user.click(removeButtons[1] as Element);
@@ -804,7 +804,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
// ===== 7. SAVE AND SELECTION TRIGGERS =====
describe('Save and Selection Triggers (ST)', () => {
- test('ST-01: ESC triggers save action', async () => {
+ it('ST-01: ESC triggers save action', async () => {
const mockDropdownChange = jest.fn();
renderWithVirtuoso(
@@ -837,7 +837,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
});
});
- test('ST-02: Mouse selection works', async () => {
+ it('ST-02: Mouse selection works', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} />,
);
@@ -859,7 +859,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
);
});
- test('ST-03: ENTER in input field creates custom value', async () => {
+ it('ST-03: ENTER in input field creates custom value', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} />,
);
@@ -892,7 +892,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
});
});
- test('ST-04: Search text persistence', async () => {
+ it('ST-04: Search text persistence', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} />,
);
@@ -932,7 +932,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
// ===== 8. SPECIAL OPTIONS AND STATES =====
describe('Special Options and States (SO)', () => {
- test('SO-01: ALL option appears first and separated', async () => {
+ it('SO-01: ALL option appears first and separated', async () => {
renderWithVirtuoso(
<CustomMultiSelect
options={mockOptions}
@@ -954,7 +954,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
});
});
- test('SO-02: ALL selection behavior', async () => {
+ it('SO-02: ALL selection behavior', async () => {
renderWithVirtuoso(
<CustomMultiSelect
options={mockOptions}
@@ -981,7 +981,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
);
});
- test('SO-03: ALL tag display when all selected', () => {
+ it('SO-03: ALL tag display when all selected', () => {
renderWithVirtuoso(
<CustomMultiSelect
options={mockOptions}
@@ -996,7 +996,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
expect(screen.queryByText('frontend')).not.toBeInTheDocument();
});
- test('SO-04: Footer information display', async () => {
+ it('SO-04: Footer information display', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} />,
);
@@ -1017,7 +1017,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
// ===== GROUPED OPTIONS SUPPORT =====
describe('Grouped Options Support', () => {
- test('handles grouped options correctly', async () => {
+ it('handles grouped options correctly', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockGroupedOptions} onChange={mockOnChange} />,
);
@@ -1041,7 +1041,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
// ===== ACCESSIBILITY TESTS =====
describe('Accessibility', () => {
- test('has proper ARIA attributes', async () => {
+ it('has proper ARIA attributes', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} />,
);
@@ -1058,7 +1058,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
});
});
- test('supports screen reader navigation', async () => {
+ it('supports screen reader navigation', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} />,
);
@@ -1079,7 +1079,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
// ===== 9. ADVANCED KEYBOARD NAVIGATION =====
describe('Advanced Keyboard Navigation (AKN)', () => {
- test('AKN-01: Shift + Arrow + Del chip deletion', async () => {
+ it('AKN-01: Shift + Arrow + Del chip deletion', async () => {
renderWithVirtuoso(
<CustomMultiSelect
options={mockOptions}
@@ -1137,7 +1137,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
expect(combobox).toHaveFocus();
});
- test('AKN-03: Mouse out closes dropdown', async () => {
+ it('AKN-03: Mouse out closes dropdown', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} />,
);
@@ -1164,7 +1164,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
// ===== 10. ADVANCED FILTERING AND HIGHLIGHTING =====
describe('Advanced Filtering and Highlighting (AFH)', () => {
- test('AFH-01: Highlighted values pushed to top', async () => {
+ it('AFH-01: Highlighted values pushed to top', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} />,
);
@@ -1220,7 +1220,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
});
});
- test('AFH-02: Distinction between selection Enter and save Enter', async () => {
+ it('AFH-02: Distinction between selection Enter and save Enter', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} />,
);
@@ -1267,7 +1267,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
// ===== 11. ADVANCED CLEAR ACTIONS =====
describe('Advanced Clear Actions (ACA)', () => {
- test('ACA-01: Clear action waiting behavior', async () => {
+ it('ACA-01: Clear action waiting behavior', async () => {
const mockOnChangeWithDelay = jest.fn().mockImplementation(
() =>
new Promise<void>((resolve) => {
@@ -1300,7 +1300,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
// ===== 12. ADVANCED UI STATES =====
describe('Advanced UI States (AUS)', () => {
- test('AUS-01: No data with previous value selected', async () => {
+ it('AUS-01: No data with previous value selected', async () => {
renderWithVirtuoso(
<CustomMultiSelect
options={[]}
@@ -1322,7 +1322,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
expect(screen.getByText('previous-value')).toBeInTheDocument();
});
- test('AUS-02: Always editable accessibility', async () => {
+ it('AUS-02: Always editable accessibility', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} loading />,
);
@@ -1338,7 +1338,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
expect(combobox).not.toBeDisabled();
});
- test('AUS-03: Sufficient space for search value', async () => {
+ it('AUS-03: Sufficient space for search value', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} />,
);
@@ -1372,7 +1372,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
// ===== 13. REGEX AND CUSTOM VALUES =====
describe('Regex and Custom Values (RCV)', () => {
- test('RCV-01: Regex pattern support', async () => {
+ it('RCV-01: Regex pattern support', async () => {
renderWithVirtuoso(
<CustomMultiSelect
options={mockOptions}
@@ -1418,7 +1418,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
});
});
- test('RCV-02: Custom values treated as normal dropdown values', async () => {
+ it('RCV-02: Custom values treated as normal dropdown values', async () => {
const customOptions = [
...mockOptions,
{ label: 'custom-value', value: 'custom-value', type: 'custom' as const },
@@ -1456,7 +1456,7 @@ describe('CustomMultiSelect - Comprehensive Tests', () => {
// ===== 14. DROPDOWN PERSISTENCE =====
describe('Dropdown Persistence (DP)', () => {
- test('DP-01: Dropdown stays open for non-save actions', async () => {
+ it('DP-01: Dropdown stays open for non-save actions', async () => {
renderWithVirtuoso(
<CustomMultiSelect options={mockOptions} onChange={mockOnChange} />,
);
diff --git a/frontend/src/components/NewSelect/__test__/CustomSelect.comprehensive.test.tsx b/frontend/src/components/NewSelect/__test__/CustomSelect.comprehensive.test.tsx
index d83d2405cd..df982c8ec3 100644
--- a/frontend/src/components/NewSelect/__test__/CustomSelect.comprehensive.test.tsx
+++ b/frontend/src/components/NewSelect/__test__/CustomSelect.comprehensive.test.tsx
@@ -50,7 +50,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
// ===== 1. CUSTOM VALUES SUPPORT =====
describe('Custom Values Support (CS)', () => {
- test('CS-02: Partial matches create custom values', async () => {
+ it('CS-02: Partial matches create custom values', async () => {
render(
<CustomSelect
options={mockOptions}
@@ -110,7 +110,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
});
});
- test('CS-03: Exact match behavior', async () => {
+ it('CS-03: Exact match behavior', async () => {
render(<CustomSelect options={mockOptions} onChange={mockOnChange} />);
const combobox = screen.getByRole('combobox');
@@ -161,7 +161,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
// ===== 2. SEARCH AND FILTERING =====
describe('Search and Filtering (SF)', () => {
- test('SF-01: Selected values pushed to top', async () => {
+ it('SF-01: Selected values pushed to top', async () => {
render(
<CustomSelect
options={mockOptions}
@@ -185,7 +185,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
});
});
- test('SF-02: Real-time search filtering', async () => {
+ it('SF-02: Real-time search filtering', async () => {
render(<CustomSelect options={mockOptions} onChange={mockOnChange} />);
const combobox = screen.getByRole('combobox');
@@ -228,7 +228,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
});
});
- test('SF-03: Search highlighting', async () => {
+ it('SF-03: Search highlighting', async () => {
render(<CustomSelect options={mockOptions} onChange={mockOnChange} />);
const combobox = screen.getByRole('combobox');
@@ -257,7 +257,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
});
});
- test('SF-04: Search with partial matches', async () => {
+ it('SF-04: Search with partial matches', async () => {
render(<CustomSelect options={mockOptions} onChange={mockOnChange} />);
const combobox = screen.getByRole('combobox');
@@ -298,7 +298,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
// ===== 3. KEYBOARD NAVIGATION =====
describe('Keyboard Navigation (KN)', () => {
- test('KN-01: Arrow key navigation in dropdown', async () => {
+ it('KN-01: Arrow key navigation in dropdown', async () => {
render(<CustomSelect options={mockOptions} onChange={mockOnChange} />);
const combobox = screen.getByRole('combobox');
@@ -329,7 +329,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
});
});
- test('KN-02: Tab navigation to dropdown', async () => {
+ it('KN-02: Tab navigation to dropdown', async () => {
render(
<div>
<input data-testid="prev-input" />
@@ -355,7 +355,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
});
});
- test('KN-03: Enter selection in dropdown', async () => {
+ it('KN-03: Enter selection in dropdown', async () => {
render(<CustomSelect options={mockOptions} onChange={mockOnChange} />);
const combobox = screen.getByRole('combobox');
@@ -376,7 +376,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
});
});
- test('KN-04: Space key selection', async () => {
+ it('KN-04: Space key selection', async () => {
render(<CustomSelect options={mockOptions} onChange={mockOnChange} />);
const combobox = screen.getByRole('combobox');
@@ -396,7 +396,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
});
});
- test('KN-05: Tab navigation within dropdown', async () => {
+ it('KN-05: Tab navigation within dropdown', async () => {
render(<CustomSelect options={mockOptions} onChange={mockOnChange} />);
const combobox = screen.getByRole('combobox');
@@ -417,7 +417,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
// ===== 4. UI/UX BEHAVIORS =====
describe('UI/UX Behaviors (UI)', () => {
- test('UI-01: Loading state does not block interaction', async () => {
+ it('UI-01: Loading state does not block interaction', async () => {
render(
<CustomSelect options={mockOptions} onChange={mockOnChange} loading />,
);
@@ -429,7 +429,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
expect(combobox).toHaveFocus();
});
- test('UI-02: Component remains editable in all states', () => {
+ it('UI-02: Component remains editable in all states', () => {
render(
<CustomSelect
options={mockOptions}
@@ -444,7 +444,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
expect(combobox).not.toBeDisabled();
});
- test('UI-03: Loading state display in footer', async () => {
+ it('UI-03: Loading state display in footer', async () => {
render(
<CustomSelect options={mockOptions} onChange={mockOnChange} loading />,
);
@@ -458,7 +458,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
});
});
- test('UI-04: Error state display in footer', async () => {
+ it('UI-04: Error state display in footer', async () => {
render(
<CustomSelect
options={mockOptions}
@@ -477,7 +477,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
});
});
- test('UI-05: No data state display', async () => {
+ it('UI-05: No data state display', async () => {
render(
<CustomSelect
options={[]}
@@ -497,7 +497,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
// ===== 6. SAVE AND SELECTION TRIGGERS =====
describe('Save and Selection Triggers (ST)', () => {
- test('ST-01: Mouse selection works', async () => {
+ it('ST-01: Mouse selection works', async () => {
render(<CustomSelect options={mockOptions} onChange={mockOnChange} />);
const combobox = screen.getByRole('combobox');
@@ -520,7 +520,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
// ===== 7. GROUPED OPTIONS SUPPORT =====
describe('Grouped Options Support', () => {
- test('handles grouped options correctly', async () => {
+ it('handles grouped options correctly', async () => {
render(
<CustomSelect options={mockGroupedOptions} onChange={mockOnChange} />,
);
@@ -541,7 +541,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
});
});
- test('grouped option selection works', async () => {
+ it('grouped option selection works', async () => {
render(
<CustomSelect options={mockGroupedOptions} onChange={mockOnChange} />,
);
@@ -566,7 +566,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
// ===== 8. ACCESSIBILITY =====
describe('Accessibility', () => {
- test('has proper ARIA attributes', async () => {
+ it('has proper ARIA attributes', async () => {
render(<CustomSelect options={mockOptions} onChange={mockOnChange} />);
const combobox = screen.getByRole('combobox');
@@ -580,7 +580,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
});
});
- test('supports screen reader navigation', async () => {
+ it('supports screen reader navigation', async () => {
render(<CustomSelect options={mockOptions} onChange={mockOnChange} />);
const combobox = screen.getByRole('combobox');
@@ -596,7 +596,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
});
});
- test('has proper focus management', async () => {
+ it('has proper focus management', async () => {
render(<CustomSelect options={mockOptions} onChange={mockOnChange} />);
const combobox = screen.getByRole('combobox');
@@ -617,7 +617,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
// ===== 10. EDGE CASES =====
describe('Edge Cases', () => {
- test('handles special characters in options', async () => {
+ it('handles special characters in options', async () => {
const specialOptions = [
{ label: 'Option with spaces', value: 'option-with-spaces' },
{ label: 'Option-with-dashes', value: 'option-with-dashes' },
@@ -638,7 +638,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
});
});
- test('handles extremely long option labels', async () => {
+ it('handles extremely long option labels', async () => {
const longLabelOptions = [
{
label:
@@ -663,7 +663,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
// ===== 11. ADVANCED KEYBOARD NAVIGATION =====
describe('Advanced Keyboard Navigation (AKN)', () => {
- test('AKN-01: Mouse out closes dropdown', async () => {
+ it('AKN-01: Mouse out closes dropdown', async () => {
render(<CustomSelect options={mockOptions} onChange={mockOnChange} />);
const combobox = screen.getByRole('combobox');
@@ -684,7 +684,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
});
});
- test('AKN-02: TAB navigation from input to dropdown', async () => {
+ it('AKN-02: TAB navigation from input to dropdown', async () => {
render(
<div>
<input data-testid="prev-input" />
@@ -722,7 +722,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
// ===== 12. ADVANCED FILTERING AND HIGHLIGHTING =====
describe('Advanced Filtering and Highlighting (AFH)', () => {
- test('AFH-01: Highlighted values pushed to top', async () => {
+ it('AFH-01: Highlighted values pushed to top', async () => {
render(<CustomSelect options={mockOptions} onChange={mockOnChange} />);
const combobox = screen.getByRole('combobox');
@@ -776,7 +776,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
});
});
- test('AFH-02: Distinction between selection Enter and save Enter', async () => {
+ it('AFH-02: Distinction between selection Enter and save Enter', async () => {
render(<CustomSelect options={mockOptions} onChange={mockOnChange} />);
const combobox = screen.getByRole('combobox');
@@ -830,7 +830,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
// ===== 13. ADVANCED CLEAR ACTIONS =====
describe('Advanced Clear Actions (ACA)', () => {
- test('ACA-01: Clear action waiting behavior', async () => {
+ it('ACA-01: Clear action waiting behavior', async () => {
const mockOnChangeWithDelay = jest.fn().mockImplementation(
() =>
new Promise((resolve) => {
@@ -860,7 +860,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
expect(mockOnChangeWithDelay).toHaveBeenCalled();
});
- test('ACA-02: Single select clear behavior like text input', async () => {
+ it('ACA-02: Single select clear behavior like text input', async () => {
render(
<CustomSelect
options={mockOptions}
@@ -883,7 +883,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
// ===== 14. ADVANCED UI STATES =====
describe('Advanced UI States (AUS)', () => {
- test('AUS-01: No data with previous value selected', async () => {
+ it('AUS-01: No data with previous value selected', async () => {
render(
<CustomSelect
options={[]}
@@ -905,7 +905,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
expect(screen.getAllByText('previous-value')).toHaveLength(2);
});
- test('AUS-02: Always editable accessibility', async () => {
+ it('AUS-02: Always editable accessibility', async () => {
render(
<CustomSelect options={mockOptions} onChange={mockOnChange} loading />,
);
@@ -921,7 +921,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
expect(combobox).not.toBeDisabled();
});
- test('AUS-03: Sufficient space for search value', async () => {
+ it('AUS-03: Sufficient space for search value', async () => {
render(<CustomSelect options={mockOptions} onChange={mockOnChange} />);
const combobox = screen.getByRole('combobox');
@@ -950,7 +950,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
});
});
- test('AUS-04: No spinners blocking user interaction', async () => {
+ it('AUS-04: No spinners blocking user interaction', async () => {
render(
<CustomSelect options={mockOptions} onChange={mockOnChange} loading />,
);
@@ -976,7 +976,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
// ===== 15. REGEX AND CUSTOM VALUES =====
describe('Regex and Custom Values (RCV)', () => {
- test('RCV-01: Regex pattern support', async () => {
+ it('RCV-01: Regex pattern support', async () => {
render(<CustomSelect options={mockOptions} onChange={mockOnChange} />);
const combobox = screen.getByRole('combobox');
@@ -1019,7 +1019,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
});
});
- test('RCV-02: Custom values treated as normal dropdown values', async () => {
+ it('RCV-02: Custom values treated as normal dropdown values', async () => {
const customOptions = [
...mockOptions,
{ label: 'custom-value', value: 'custom-value', type: 'custom' as const },
@@ -1051,7 +1051,7 @@ describe('CustomSelect - Comprehensive Tests', () => {
// ===== 16. DROPDOWN PERSISTENCE =====
describe('Dropdown Persistence (DP)', () => {
- test('DP-01: Dropdown closes only on save actions', async () => {
+ it('DP-01: Dropdown closes only on save actions', async () => {
render(<CustomSelect options={mockOptions} onChange={mockOnChange} />);
const combobox = screen.getByRole('combobox');
diff --git a/frontend/src/components/NewSelect/__test__/VariableItem.integration.test.tsx b/frontend/src/components/NewSelect/__test__/VariableItem.integration.test.tsx
index c57d0b8b1d..c1f4b5ea1a 100644
--- a/frontend/src/components/NewSelect/__test__/VariableItem.integration.test.tsx
+++ b/frontend/src/components/NewSelect/__test__/VariableItem.integration.test.tsx
@@ -86,7 +86,7 @@ describe('VariableItem Integration Tests', () => {
// ===== 1. INTEGRATION WITH CUSTOMSELECT =====
describe('CustomSelect Integration (VI)', () => {
- test('VI-01: Single select variable integration', async () => {
+ it('VI-01: Single select variable integration', async () => {
const variable = createMockVariable({
multiSelect: false,
type: 'CUSTOM',
@@ -130,7 +130,7 @@ describe('VariableItem Integration Tests', () => {
// ===== 2. INTEGRATION WITH CUSTOMMULTISELECT =====
describe('CustomMultiSelect Integration (VI)', () => {
- test('VI-02: Multi select variable integration', async () => {
+ it('VI-02: Multi select variable integration', async () => {
const variable = createMockVariable({
multiSelect: true,
type: 'CUSTOM',
@@ -174,7 +174,7 @@ describe('VariableItem Integration Tests', () => {
// ===== 3. TEXTBOX VARIABLE TYPE =====
describe('Textbox Variable Integration', () => {
- test('VI-03: Textbox variable handling', async () => {
+ it('VI-03: Textbox variable handling', async () => {
const variable = createMockVariable({
type: 'TEXTBOX',
selectedValue: 'initial-value',
@@ -219,7 +219,7 @@ describe('VariableItem Integration Tests', () => {
// ===== 4. VALUE PERSISTENCE AND STATE MANAGEMENT =====
describe('Value Persistence and State Management', () => {
- test('VI-04: All selected state handling', () => {
+ it('VI-04: All selected state handling', () => {
const variable = createMockVariable({
multiSelect: true,
type: 'CUSTOM',
@@ -243,7 +243,7 @@ describe('VariableItem Integration Tests', () => {
expect(screen.getByText('ALL')).toBeInTheDocument();
});
- test('VI-05: Dropdown behavior with temporary selections', async () => {
+ it('VI-05: Dropdown behavior with temporary selections', async () => {
const variable = createMockVariable({
multiSelect: true,
type: 'CUSTOM',
@@ -277,7 +277,7 @@ describe('VariableItem Integration Tests', () => {
// ===== 6. ACCESSIBILITY AND USER EXPERIENCE =====
describe('Accessibility and User Experience', () => {
- test('VI-06: Variable description tooltip', async () => {
+ it('VI-06: Variable description tooltip', async () => {
const variable = createMockVariable({
description: 'This variable controls the service selection',
type: 'CUSTOM',
@@ -310,7 +310,7 @@ describe('VariableItem Integration Tests', () => {
});
});
- test('VI-07: Variable name display', () => {
+ it('VI-07: Variable name display', () => {
const variable = createMockVariable({
name: 'service_name',
type: 'CUSTOM',
@@ -331,7 +331,7 @@ describe('VariableItem Integration Tests', () => {
expect(screen.getByText('$service_name')).toBeInTheDocument();
});
- test('VI-08: Max tag count behavior', async () => {
+ it('VI-08: Max tag count behavior', async () => {
const variable = createMockVariable({
multiSelect: true,
type: 'CUSTOM',
@@ -365,7 +365,7 @@ describe('VariableItem Integration Tests', () => {
// ===== 8. SEARCH INTERACTION TESTS =====
describe('Search Interaction Tests', () => {
- test('VI-14: Search persistence across dropdown open/close', async () => {
+ it('VI-14: Search persistence across dropdown open/close', async () => {
const variable = createMockVariable({
type: 'CUSTOM',
customValue: 'option1,option2,option3',
@@ -417,7 +417,7 @@ describe('VariableItem Integration Tests', () => {
// ===== 9. ADVANCED KEYBOARD NAVIGATION =====
describe('Advanced Keyboard Navigation (VI)', () => {
- test('VI-15: Shift + Arrow + Del chip deletion in multiselect', async () => {
+ it('VI-15: Shift + Arrow + Del chip deletion in multiselect', async () => {
const variable = createMockVariable({
type: 'CUSTOM',
customValue: 'option1,option2,option3',
@@ -461,7 +461,7 @@ describe('VariableItem Integration Tests', () => {
// ===== 11. ADVANCED UI STATES =====
describe('Advanced UI States (VI)', () => {
- test('VI-19: No data with previous value selected in variable', async () => {
+ it('VI-19: No data with previous value selected in variable', async () => {
const variable = createMockVariable({
type: 'CUSTOM',
customValue: '',
@@ -499,7 +499,7 @@ describe('VariableItem Integration Tests', () => {
expect(combobox).toBeInTheDocument();
});
- test('VI-20: Always editable accessibility in variable', async () => {
+ it('VI-20: Always editable accessibility in variable', async () => {
const variable = createMockVariable({
type: 'CUSTOM',
customValue: 'option1,option2',
@@ -530,7 +530,7 @@ describe('VariableItem Integration Tests', () => {
// ===== 13. DROPDOWN PERSISTENCE =====
describe('Dropdown Persistence (VI)', () => {
- test('VI-24: Dropdown stays open for non-save actions in variable', async () => {
+ it('VI-24: Dropdown stays open for non-save actions in variable', async () => {
const variable = createMockVariable({
type: 'CUSTOM',
customValue: 'option1,option2,option3',
diff --git a/frontend/src/components/OverflowInputToolTip/OverflowInputToolTip.test.tsx b/frontend/src/components/OverflowInputToolTip/OverflowInputToolTip.test.tsx
index 334b74fc9a..2ff39dc13b 100644
--- a/frontend/src/components/OverflowInputToolTip/OverflowInputToolTip.test.tsx
+++ b/frontend/src/components/OverflowInputToolTip/OverflowInputToolTip.test.tsx
@@ -44,7 +44,7 @@ describe('OverflowInputToolTip', () => {
jest.restoreAllMocks();
});
- test('shows tooltip when content overflows and input is clamped at maxAutoWidth', async () => {
+ it('shows tooltip when content overflows and input is clamped at maxAutoWidth', async () => {
mockOverflow(150, 250); // clientWidth >= maxAutoWidth (150), scrollWidth > clientWidth
render(<OverflowInputToolTip value="Very long overflowing text" />);
@@ -64,7 +64,7 @@ describe('OverflowInputToolTip', () => {
).toBeInTheDocument();
});
- test('does NOT show tooltip when content does not overflow', async () => {
+ it('does NOT show tooltip when content does not overflow', async () => {
mockOverflow(150, 100); // content fits (scrollWidth <= clientWidth)
render(<OverflowInputToolTip value="Short text" />);
@@ -76,7 +76,7 @@ describe('OverflowInputToolTip', () => {
});
});
- test('does NOT show tooltip when content overflows but input is NOT at maxAutoWidth', async () => {
+ it('does NOT show tooltip when content overflows but input is NOT at maxAutoWidth', async () => {
mockOverflow(100, 250); // clientWidth < maxAutoWidth (150), scrollWidth > clientWidth
render(<OverflowInputToolTip value="Long but input not clamped" />);
@@ -88,7 +88,7 @@ describe('OverflowInputToolTip', () => {
});
});
- test('uncontrolled input allows typing', async () => {
+ it('uncontrolled input allows typing', async () => {
render(<OverflowInputToolTip defaultValue="Init" />);
const input = screen.getByRole('textbox') as HTMLInputElement;
@@ -97,7 +97,7 @@ describe('OverflowInputToolTip', () => {
expect(input).toHaveValue('InitABC');
});
- test('disabled input never shows tooltip even if overflowing', async () => {
+ it('disabled input never shows tooltip even if overflowing', async () => {
mockOverflow(150, 300);
render(<OverflowInputToolTip value="Overflowing!" disabled />);
@@ -109,7 +109,7 @@ describe('OverflowInputToolTip', () => {
});
});
- test('renders mirror span and input correctly (structural assertions instead of snapshot)', () => {
+ it('renders mirror span and input correctly (structural assertions instead of snapshot)', () => {
const { container } = render(<OverflowInputToolTip value="Snapshot" />);
const mirror = container.querySelector('.overflow-input-mirror');
const input = container.querySelector('input') as HTMLInputElement | null;
diff --git a/frontend/src/components/QueryBuilderV2/QueryV2/TraceOperator/__tests__/traceOperatorContextUtils.test.ts b/frontend/src/components/QueryBuilderV2/QueryV2/TraceOperator/__tests__/traceOperatorContextUtils.test.ts
index 28e1cb4f95..28bd69c23c 100644
--- a/frontend/src/components/QueryBuilderV2/QueryV2/TraceOperator/__tests__/traceOperatorContextUtils.test.ts
+++ b/frontend/src/components/QueryBuilderV2/QueryV2/TraceOperator/__tests__/traceOperatorContextUtils.test.ts
@@ -29,7 +29,7 @@ describe('traceOperatorContextUtils', () => {
null,
);
- expect(context).toEqual({
+ expect(context).toStrictEqual({
tokenType: TraceOperatorGrammarLexer.IDENTIFIER,
text: 'test',
start: 0,
@@ -62,7 +62,7 @@ describe('traceOperatorContextUtils', () => {
false,
);
- expect(context).toEqual({
+ expect(context).toStrictEqual({
tokenType: TraceOperatorGrammarLexer.IDENTIFIER,
text: 'test',
start: 0,
@@ -193,7 +193,7 @@ describe('traceOperatorContextUtils', () => {
it('should return default context for empty query', () => {
const result = getTraceOperatorContextAtCursor('', 0);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
tokenType: -1,
text: '',
start: 0,
@@ -211,7 +211,7 @@ describe('traceOperatorContextUtils', () => {
it('should return default context for null query', () => {
const result = getTraceOperatorContextAtCursor(null as any, 0);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
tokenType: -1,
text: '',
start: 0,
@@ -229,7 +229,7 @@ describe('traceOperatorContextUtils', () => {
it('should return default context for undefined query', () => {
const result = getTraceOperatorContextAtCursor(undefined as any, 0);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
tokenType: -1,
text: '',
start: 0,
diff --git a/frontend/src/components/QueryBuilderV2/QueryV2/TraceOperator/__tests__/utils.test.ts b/frontend/src/components/QueryBuilderV2/QueryV2/TraceOperator/__tests__/utils.test.ts
index 88443842ce..148cac59c6 100644
--- a/frontend/src/components/QueryBuilderV2/QueryV2/TraceOperator/__tests__/utils.test.ts
+++ b/frontend/src/components/QueryBuilderV2/QueryV2/TraceOperator/__tests__/utils.test.ts
@@ -8,21 +8,21 @@ const makeTraceOperator = (expression: string): IBuilderTraceOperator =>
describe('getInvolvedQueriesInTraceOperator', () => {
it('returns empty array for empty input', () => {
const result = getInvolvedQueriesInTraceOperator([]);
- expect(result).toEqual([]);
+ expect(result).toStrictEqual([]);
});
it('extracts identifiers from expression', () => {
const result = getInvolvedQueriesInTraceOperator([
makeTraceOperator('A => B'),
]);
- expect(result).toEqual(['A', 'B']);
+ expect(result).toStrictEqual(['A', 'B']);
});
it('extracts identifiers from complex expression', () => {
const result = getInvolvedQueriesInTraceOperator([
makeTraceOperator('A => (NOT B || C)'),
]);
- expect(result).toEqual(['A', 'B', 'C']);
+ expect(result).toStrictEqual(['A', 'B', 'C']);
});
it('filters out querynames from complex expression', () => {
@@ -31,7 +31,7 @@ describe('getInvolvedQueriesInTraceOperator', () => {
'(A1 && (NOT B2 || (C3 -> (D4 && E5)))) => ((F6 || G7) && (NOT (H8 -> I9)))',
),
]);
- expect(result).toEqual([
+ expect(result).toStrictEqual([
'A1',
'B2',
'C3',
diff --git a/frontend/src/components/QueryBuilderV2/__tests__/previousQuery.utils.test.ts b/frontend/src/components/QueryBuilderV2/__tests__/previousQuery.utils.test.ts
index 030ed067e4..098fe1bb6c 100644
--- a/frontend/src/components/QueryBuilderV2/__tests__/previousQuery.utils.test.ts
+++ b/frontend/src/components/QueryBuilderV2/__tests__/previousQuery.utils.test.ts
@@ -85,7 +85,7 @@ describe('previousQuery.utils', () => {
saveAsPreviousQuery(key, sampleQuery);
const fromStore = getPreviousQueryFromKey(key);
- expect(fromStore).toEqual(sampleQuery);
+ expect(fromStore).toStrictEqual(sampleQuery);
});
it('saveAsPreviousQuery merges multiple entries and removeKeyFromPreviousQuery deletes one', () => {
diff --git a/frontend/src/components/QueryBuilderV2/__tests__/utils.test.ts b/frontend/src/components/QueryBuilderV2/__tests__/utils.test.ts
index feff0667f9..0d77c05aeb 100644
--- a/frontend/src/components/QueryBuilderV2/__tests__/utils.test.ts
+++ b/frontend/src/components/QueryBuilderV2/__tests__/utils.test.ts
@@ -22,18 +22,20 @@ describe('convertFiltersToExpression', () => {
it('should handle empty, null, and undefined inputs', () => {
// Test null and undefined
- expect(convertFiltersToExpression(null as any)).toEqual({ expression: '' });
- expect(convertFiltersToExpression(undefined as any)).toEqual({
+ expect(convertFiltersToExpression(null as any)).toStrictEqual({
+ expression: '',
+ });
+ expect(convertFiltersToExpression(undefined as any)).toStrictEqual({
expression: '',
});
// Test empty filters
- expect(convertFiltersToExpression({ items: [], op: 'AND' })).toEqual({
+ expect(convertFiltersToExpression({ items: [], op: 'AND' })).toStrictEqual({
expression: '',
});
expect(
convertFiltersToExpression({ items: undefined, op: 'AND' } as any),
- ).toEqual({ expression: '' });
+ ).toStrictEqual({ expression: '' });
});
it('should convert basic comparison operators with proper value formatting', () => {
@@ -92,7 +94,7 @@ describe('convertFiltersToExpression', () => {
};
const result = convertFiltersToExpression(filters);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
expression:
"service = 'api-gateway' AND status != 'error' AND duration > 100 AND count <= 50 AND is_active = true AND enabled = false AND count = 0 AND regex REGEXP '.*'",
});
@@ -124,7 +126,7 @@ describe('convertFiltersToExpression', () => {
};
const result = convertFiltersToExpression(filters);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
expression:
"message = 'user\\'s data' AND description = '' AND path = '/api/v1/users'",
});
@@ -162,7 +164,7 @@ describe('convertFiltersToExpression', () => {
};
const result = convertFiltersToExpression(filters);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
expression:
"service in ['api-gateway', 'user-service', 'auth-service'] AND status in ['success'] AND tags in [] AND name in ['John\\'s', 'Mary\\'s', 'Bob']",
});
@@ -224,7 +226,7 @@ describe('convertFiltersToExpression', () => {
};
const result = convertFiltersToExpression(filters);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
expression:
"service NOT IN ['api-gateway', 'user-service'] AND message NOT LIKE 'error' AND path NOT REGEXP '/api/.*' AND service NOT IN ['api-gateway'] AND user_id NOT EXISTS AND description NOT CONTAINS 'error' AND NOT has(tags, 'production') AND NOT hasAny(labels, ['env:prod', 'service:api'])",
});
@@ -268,7 +270,7 @@ describe('convertFiltersToExpression', () => {
};
const result = convertFiltersToExpression(filters);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
expression:
"user_id exists AND user_id exists AND has(tags, 'production') AND hasAny(tags, ['production', 'staging']) AND hasAll(tags, ['production', 'monitoring'])",
});
@@ -312,7 +314,7 @@ describe('convertFiltersToExpression', () => {
};
const result = convertFiltersToExpression(filters);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
expression:
"service = 'api-gateway' AND status = 'success' AND service in ['api-gateway']",
});
@@ -362,7 +364,7 @@ describe('convertFiltersToExpression', () => {
};
const result = convertFiltersToExpression(filters);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
expression:
"service in ['api-gateway', 'user-service'] AND user_id exists AND has(tags, 'production') AND duration > 100 AND status NOT IN ['error', 'timeout'] AND method = 'POST'",
});
@@ -412,7 +414,7 @@ describe('convertFiltersToExpression', () => {
};
const result = convertFiltersToExpression(filters);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
expression:
"count = 0 AND score > 100 AND limit >= 50 AND threshold < 1000 AND max_value <= 999 AND values in ['1', '2', '3', '4', '5']",
});
@@ -456,7 +458,7 @@ describe('convertFiltersToExpression', () => {
};
const result = convertFiltersToExpression(filters);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
expression:
"is_active = true AND is_deleted = false AND email = '[email protected]' AND description = 'Contains \"quotes\" and \\'apostrophes\\'' AND path = '/api/v1/users/123?filter=true'",
});
@@ -506,7 +508,7 @@ describe('convertFiltersToExpression', () => {
};
const result = convertFiltersToExpression(filters);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
expression:
"has(tags, 'production') AND hasAny(labels, ['env:prod', 'service:api']) AND hasAll(metadata, ['version:1.0', 'team:backend']) AND services in ['api-gateway', 'user-service', 'auth-service', 'payment-service'] AND excluded_services NOT IN ['legacy-service', 'deprecated-service'] AND status_codes in ['200', '201', '400', '500']",
});
@@ -544,7 +546,7 @@ describe('convertFiltersToExpression', () => {
};
const result = convertFiltersToExpression(filters);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
expression:
"user_id NOT EXISTS AND description NOT CONTAINS 'error' AND NOT has(tags, 'production') AND NOT hasAny(labels, ['env:prod', 'service:api'])",
});
@@ -568,7 +570,7 @@ describe('convertFiltersToExpression', () => {
undefined,
);
- expect(result.filters).toEqual(filters);
+ expect(result.filters).toStrictEqual(filters);
expect(result.filter.expression).toBe("service.name = 'test-service'");
});
@@ -583,7 +585,7 @@ describe('convertFiltersToExpression', () => {
undefined,
);
- expect(result.filters).toEqual(filters);
+ expect(result.filters).toStrictEqual(filters);
expect(result.filter.expression).toBe('');
});
@@ -611,7 +613,7 @@ describe('convertFiltersToExpression', () => {
expect(result.filter).toBeDefined();
expect(result.filter.expression).toBe("service.name = 'updated-service'");
// Ensure parser can parse the existing query
- expect(extractQueryPairs(existingQuery)).toEqual(
+ expect(extractQueryPairs(existingQuery)).toStrictEqual(
expect.arrayContaining([
expect.objectContaining({
key: 'service.name',
@@ -805,7 +807,7 @@ describe('convertAggregationToExpression', () => {
temporality: 'delta',
});
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{
metricName: 'test_metric',
timeAggregation: 'avg',
@@ -825,9 +827,11 @@ describe('convertAggregationToExpression', () => {
spaceAggregation: 'noop',
});
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{
metricName: 'test_metric',
+ reduceTo: undefined,
+ temporality: undefined,
timeAggregation: 'count',
spaceAggregation: 'count',
},
@@ -841,9 +845,11 @@ describe('convertAggregationToExpression', () => {
dataSource: DataSource.METRICS,
});
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{
metricName: '',
+ reduceTo: undefined,
+ temporality: undefined,
timeAggregation: 'sum',
spaceAggregation: 'sum',
},
@@ -858,7 +864,7 @@ describe('convertAggregationToExpression', () => {
alias: 'trace_alias',
});
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{
expression: 'count(test_metric)',
alias: 'trace_alias',
@@ -874,7 +880,7 @@ describe('convertAggregationToExpression', () => {
alias: 'log_alias',
});
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{
expression: 'avg(test_metric)',
alias: 'log_alias',
@@ -889,7 +895,7 @@ describe('convertAggregationToExpression', () => {
dataSource: DataSource.TRACES,
});
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{
expression: 'count()',
},
@@ -903,7 +909,7 @@ describe('convertAggregationToExpression', () => {
dataSource: DataSource.LOGS,
});
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{
expression: 'sum(test_metric)',
},
@@ -917,9 +923,11 @@ describe('convertAggregationToExpression', () => {
dataSource: DataSource.METRICS,
});
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{
metricName: 'test_metric',
+ reduceTo: undefined,
+ temporality: undefined,
timeAggregation: 'max',
spaceAggregation: 'max',
},
@@ -933,7 +941,7 @@ describe('convertAggregationToExpression', () => {
dataSource: DataSource.METRICS,
});
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{
metricName: 'test_metric',
timeAggregation: 'sum',
@@ -951,7 +959,7 @@ describe('convertAggregationToExpression', () => {
dataSource: DataSource.TRACES,
});
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{
expression: 'count()',
},
@@ -965,7 +973,7 @@ describe('convertAggregationToExpression', () => {
dataSource: DataSource.LOGS,
});
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{
expression: 'count()',
},
diff --git a/frontend/src/components/QuickFilters/FilterRenderers/Checkbox/Checkbox.test.tsx b/frontend/src/components/QuickFilters/FilterRenderers/Checkbox/Checkbox.test.tsx
index 928b9bd7dd..3e686d54da 100644
--- a/frontend/src/components/QuickFilters/FilterRenderers/Checkbox/Checkbox.test.tsx
+++ b/frontend/src/components/QuickFilters/FilterRenderers/Checkbox/Checkbox.test.tsx
@@ -471,6 +471,6 @@ describe('CheckboxFilter - User Flows', () => {
expect(filterForServiceName.key.key).toBe(SERVICE_NAME_KEY);
expect(filterForServiceName.op).toBe('in');
- expect(filterForServiceName.value).toEqual(['mq-kafka', 'otel-demo']);
+ expect(filterForServiceName.value).toStrictEqual(['mq-kafka', 'otel-demo']);
});
});
diff --git a/frontend/src/components/QuickFilters/tests/QuickFilters.test.tsx b/frontend/src/components/QuickFilters/tests/QuickFilters.test.tsx
index 7206ac506f..413d6d8e11 100644
--- a/frontend/src/components/QuickFilters/tests/QuickFilters.test.tsx
+++ b/frontend/src/components/QuickFilters/tests/QuickFilters.test.tsx
@@ -323,7 +323,9 @@ describe('Quick Filters with custom filters', () => {
const settingsButton = icon.closest('button') ?? icon;
await user.click(settingsButton);
- expect(await screen.findByText('Edit quick filters')).toBeInTheDocument();
+ await expect(
+ screen.findByText('Edit quick filters'),
+ ).resolves.toBeInTheDocument();
const addedSection = screen.getByText(ADDED_FILTERS_LABEL).parentElement!;
expect(addedSection).toContainElement(
@@ -454,7 +456,7 @@ describe('Quick Filters with custom filters', () => {
});
const requestBody = putHandler.mock.calls[0][0];
- expect(requestBody.filters).toEqual(
+ expect(requestBody.filters).toStrictEqual(
expect.arrayContaining([
expect.not.objectContaining({ key: FILTER_OS_DESCRIPTION }),
]),
@@ -535,12 +537,16 @@ describe('Quick Filters refetch behavior', () => {
);
const { unmount } = render(<TestQuickFilters signal={SIGNAL} />);
- expect(await screen.findByText(FILTER_SERVICE_NAME)).toBeInTheDocument();
+ await expect(
+ screen.findByText(FILTER_SERVICE_NAME),
+ ).resolves.toBeInTheDocument();
unmount();
render(<TestQuickFilters signal={SIGNAL} />);
- expect(await screen.findByText(FILTER_SERVICE_NAME)).toBeInTheDocument();
+ await expect(
+ screen.findByText(FILTER_SERVICE_NAME),
+ ).resolves.toBeInTheDocument();
expect(getCalls).toBe(2);
});
@@ -578,7 +584,9 @@ describe('Quick Filters refetch behavior', () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
render(<TestQuickFilters signal={SIGNAL} />);
- expect(await screen.findByText(FILTER_SERVICE_NAME)).toBeInTheDocument();
+ await expect(
+ screen.findByText(FILTER_SERVICE_NAME),
+ ).resolves.toBeInTheDocument();
const icon = await screen.findByTestId(SETTINGS_ICON_TEST_ID);
const settingsButton = icon.closest('button') ?? icon;
@@ -628,7 +636,9 @@ describe('Quick Filters refetch behavior', () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
render(<TestQuickFilters signal={SIGNAL} />);
- expect(await screen.findByText(FILTER_SERVICE_NAME)).toBeInTheDocument();
+ await expect(
+ screen.findByText(FILTER_SERVICE_NAME),
+ ).resolves.toBeInTheDocument();
const icon = await screen.findByTestId(SETTINGS_ICON_TEST_ID);
const settingsButton = icon.closest('button') ?? icon;
@@ -657,6 +667,8 @@ describe('Quick Filters refetch behavior', () => {
render(<TestQuickFilters signal={SIGNAL} config={[]} />);
- expect(await screen.findByText('No filters found')).toBeInTheDocument();
+ await expect(
+ screen.findByText('No filters found'),
+ ).resolves.toBeInTheDocument();
});
});
diff --git a/frontend/src/components/RouteTab/RouteTab.test.tsx b/frontend/src/components/RouteTab/RouteTab.test.tsx
index 9ea7799a48..1d604b50e7 100644
--- a/frontend/src/components/RouteTab/RouteTab.test.tsx
+++ b/frontend/src/components/RouteTab/RouteTab.test.tsx
@@ -28,7 +28,7 @@ const testRoutes: RouteTabProps['routes'] = [
];
describe('RouteTab component', () => {
- test('renders correctly', () => {
+ it('renders correctly', () => {
const history = createMemoryHistory();
render(
<Router history={history}>
@@ -39,7 +39,7 @@ describe('RouteTab component', () => {
expect(screen.getByRole('tab', { name: 'Tab2' })).toBeInTheDocument();
});
- test('renders correct number of tabs', () => {
+ it('renders correct number of tabs', () => {
const history = createMemoryHistory();
render(
<Router history={history}>
@@ -47,10 +47,10 @@ describe('RouteTab component', () => {
</Router>,
);
const tabs = screen.getAllByRole('tab');
- expect(tabs.length).toBe(testRoutes.length);
+ expect(tabs).toHaveLength(testRoutes.length);
});
- test('sets provided activeKey as active tab', () => {
+ it('sets provided activeKey as active tab', () => {
const history = createMemoryHistory();
render(
<Router history={history}>
@@ -62,7 +62,7 @@ describe('RouteTab component', () => {
).toBeInTheDocument();
});
- test('navigates to correct route on tab click', () => {
+ it('navigates to correct route on tab click', () => {
const history = createMemoryHistory();
render(
<Router history={history}>
@@ -74,7 +74,7 @@ describe('RouteTab component', () => {
expect(history.location.pathname).toBe('/tab2');
});
- test('calls onChangeHandler on tab change', () => {
+ it('calls onChangeHandler on tab change', () => {
const onChangeHandler = jest.fn();
const history = createMemoryHistory();
render(
diff --git a/frontend/src/components/ServiceAccountDrawer/__tests__/EditKeyModal.test.tsx b/frontend/src/components/ServiceAccountDrawer/__tests__/EditKeyModal.test.tsx
index 08a31a0bbf..3b973c8acc 100644
--- a/frontend/src/components/ServiceAccountDrawer/__tests__/EditKeyModal.test.tsx
+++ b/frontend/src/components/ServiceAccountDrawer/__tests__/EditKeyModal.test.tsx
@@ -70,9 +70,9 @@ describe('EditKeyModal (URL-controlled)', () => {
it('renders key data from prop when edit-key param is set', async () => {
renderModal();
- expect(
- await screen.findByDisplayValue('Original Key Name'),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByDisplayValue('Original Key Name'),
+ ).resolves.toBeInTheDocument();
expect(screen.getByRole('button', { name: /Save Changes/i })).toBeDisabled();
});
@@ -111,7 +111,7 @@ describe('EditKeyModal (URL-controlled)', () => {
const latestUrlUpdate =
onUrlUpdate.mock.calls[onUrlUpdate.mock.calls.length - 1]?.[0];
- expect(latestUrlUpdate).toEqual(
+ expect(latestUrlUpdate).toStrictEqual(
expect.objectContaining({
queryString: expect.any(String),
}),
@@ -134,9 +134,9 @@ describe('EditKeyModal (URL-controlled)', () => {
await user.click(screen.getByRole('button', { name: /Revoke Key/i }));
// Same dialog, now showing revoke confirmation
- expect(
- await screen.findByRole('dialog', { name: /Revoke Original Key Name/i }),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByRole('dialog', { name: /Revoke Original Key Name/i }),
+ ).resolves.toBeInTheDocument();
expect(
screen.getByText(/Revoking this key will permanently invalidate it/i),
).toBeInTheDocument();
diff --git a/frontend/src/components/ServiceAccountDrawer/__tests__/ServiceAccountDrawer.test.tsx b/frontend/src/components/ServiceAccountDrawer/__tests__/ServiceAccountDrawer.test.tsx
index 08625f2ec4..bd0262200a 100644
--- a/frontend/src/components/ServiceAccountDrawer/__tests__/ServiceAccountDrawer.test.tsx
+++ b/frontend/src/components/ServiceAccountDrawer/__tests__/ServiceAccountDrawer.test.tsx
@@ -104,7 +104,9 @@ describe('ServiceAccountDrawer', () => {
it('renders Overview tab by default: editable name input, locked email, Save disabled when not dirty', async () => {
renderDrawer();
- expect(await screen.findByDisplayValue('CI Bot')).toBeInTheDocument();
+ await expect(
+ screen.findByDisplayValue('CI Bot'),
+ ).resolves.toBeInTheDocument();
expect(screen.getByText('[email protected]')).toBeInTheDocument();
expect(screen.getByRole('button', { name: /Save Changes/i })).toBeDisabled();
});
@@ -272,11 +274,11 @@ describe('ServiceAccountDrawer', () => {
renderDrawer();
- expect(
- await screen.findByText(
+ await expect(
+ screen.findByText(
/An unexpected error occurred while fetching service account details/i,
),
- ).toBeInTheDocument();
+ ).resolves.toBeInTheDocument();
});
});
@@ -349,11 +351,11 @@ describe('ServiceAccountDrawer – save-error UX', () => {
await waitFor(() => expect(saveBtn).not.toBeDisabled());
await user.click(saveBtn);
- expect(
- await screen.findByText(/Name update.*name update failed/i, undefined, {
+ await expect(
+ screen.findByText(/Name update.*name update failed/i, undefined, {
timeout: 5000,
}),
- ).toBeInTheDocument();
+ ).resolves.toBeInTheDocument();
});
it('role add failure shows SaveErrorItem with the role name context', async () => {
@@ -385,15 +387,11 @@ describe('ServiceAccountDrawer – save-error UX', () => {
await waitFor(() => expect(saveBtn).not.toBeDisabled());
await user.click(saveBtn);
- expect(
- await screen.findByText(
- /Role 'signoz-viewer'.*role assign failed/i,
- undefined,
- {
- timeout: 5000,
- },
- ),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText(/Role 'signoz-viewer'.*role assign failed/i, undefined, {
+ timeout: 5000,
+ }),
+ ).resolves.toBeInTheDocument();
});
it('role add retries on 429 then succeeds without showing an error', async () => {
diff --git a/frontend/src/components/TanStackTableView/__tests__/TanStackCustomTableRow.test.tsx b/frontend/src/components/TanStackTableView/__tests__/TanStackCustomTableRow.test.tsx
index 4ebc7fcd27..e145562fa0 100644
--- a/frontend/src/components/TanStackTableView/__tests__/TanStackCustomTableRow.test.tsx
+++ b/frontend/src/components/TanStackTableView/__tests__/TanStackCustomTableRow.test.tsx
@@ -63,7 +63,9 @@ describe('TanStackCustomTableRow', () => {
</tbody>
</table>,
);
- expect(await screen.findByTestId('mocked-row-cells')).toBeInTheDocument();
+ await expect(
+ screen.findByTestId('mocked-row-cells'),
+ ).resolves.toBeInTheDocument();
});
it('applies active class when isRowActive returns true', () => {
diff --git a/frontend/src/components/TanStackTableView/__tests__/TanStackRow.test.tsx b/frontend/src/components/TanStackTableView/__tests__/TanStackRow.test.tsx
index 662f44d9f2..a4212650cd 100644
--- a/frontend/src/components/TanStackTableView/__tests__/TanStackRow.test.tsx
+++ b/frontend/src/components/TanStackTableView/__tests__/TanStackRow.test.tsx
@@ -183,7 +183,7 @@ describe('TanStackRowCells', () => {
</tbody>
</table>,
);
- expect(await screen.findByText('expanded-r1')).toBeInTheDocument();
+ await expect(screen.findByText('expanded-r1')).resolves.toBeInTheDocument();
});
describe('new tab click', () => {
diff --git a/frontend/src/components/TanStackTableView/__tests__/useColumnState.test.tsx b/frontend/src/components/TanStackTableView/__tests__/useColumnState.test.tsx
index e8464a62c4..3f1086bab9 100644
--- a/frontend/src/components/TanStackTableView/__tests__/useColumnState.test.tsx
+++ b/frontend/src/components/TanStackTableView/__tests__/useColumnState.test.tsx
@@ -36,7 +36,7 @@ describe('useColumnState', () => {
renderHook(() => useColumnState({ storageKey: TEST_KEY, columns }));
const state = useColumnStore.getState().tables[TEST_KEY];
- expect(state.hiddenColumnIds).toEqual(['b']);
+ expect(state.hiddenColumnIds).toStrictEqual(['b']);
});
it('does not initialize without storageKey', () => {
@@ -61,7 +61,7 @@ describe('useColumnState', () => {
useColumnState({ storageKey: TEST_KEY, columns }),
);
- expect(result.current.columnVisibility).toEqual({ b: false });
+ expect(result.current.columnVisibility).toStrictEqual({ b: false });
});
it('applies visibilityBehavior for grouped state', () => {
@@ -79,13 +79,15 @@ describe('useColumnState', () => {
const { result: notGrouped } = renderHook(() =>
useColumnState({ storageKey: TEST_KEY, columns, isGrouped: false }),
);
- expect(notGrouped.current.columnVisibility).toEqual({ grouped: false });
+ expect(notGrouped.current.columnVisibility).toStrictEqual({
+ grouped: false,
+ });
// Grouped
const { result: grouped } = renderHook(() =>
useColumnState({ storageKey: TEST_KEY, columns, isGrouped: true }),
);
- expect(grouped.current.columnVisibility).toEqual({ ungrouped: false });
+ expect(grouped.current.columnVisibility).toStrictEqual({ ungrouped: false });
});
it('combines store hidden + visibilityBehavior', () => {
@@ -103,7 +105,10 @@ describe('useColumnState', () => {
useColumnState({ storageKey: TEST_KEY, columns, isGrouped: true }),
);
- expect(result.current.columnVisibility).toEqual({ a: false, b: false });
+ expect(result.current.columnVisibility).toStrictEqual({
+ a: false,
+ b: false,
+ });
});
});
@@ -119,7 +124,7 @@ describe('useColumnState', () => {
useColumnState({ storageKey: TEST_KEY, columns }),
);
- expect(result.current.sortedColumns.map((c) => c.id)).toEqual([
+ expect(result.current.sortedColumns.map((c) => c.id)).toStrictEqual([
'a',
'b',
'c',
@@ -138,7 +143,7 @@ describe('useColumnState', () => {
useColumnState({ storageKey: TEST_KEY, columns }),
);
- expect(result.current.sortedColumns.map((c) => c.id)).toEqual([
+ expect(result.current.sortedColumns.map((c) => c.id)).toStrictEqual([
'c',
'a',
'b',
@@ -157,7 +162,7 @@ describe('useColumnState', () => {
useColumnState({ storageKey: TEST_KEY, columns }),
);
- expect(result.current.sortedColumns.map((c) => c.id)).toEqual([
+ expect(result.current.sortedColumns.map((c) => c.id)).toStrictEqual([
'pinned',
'b',
'a',
@@ -181,7 +186,7 @@ describe('useColumnState', () => {
result.current.hideColumn('a');
});
- expect(result.current.columnVisibility).toEqual({ a: false });
+ expect(result.current.columnVisibility).toStrictEqual({ a: false });
});
it('showColumn shows a column', () => {
@@ -195,13 +200,13 @@ describe('useColumnState', () => {
useColumnState({ storageKey: TEST_KEY, columns }),
);
- expect(result.current.columnVisibility).toEqual({ a: false });
+ expect(result.current.columnVisibility).toStrictEqual({ a: false });
act(() => {
result.current.showColumn('a');
});
- expect(result.current.columnVisibility).toEqual({});
+ expect(result.current.columnVisibility).toStrictEqual({});
});
it('setColumnSizing updates sizing', () => {
@@ -219,7 +224,7 @@ describe('useColumnState', () => {
result.current.setColumnSizing({ a: 200 });
});
- expect(result.current.columnSizing).toEqual({ a: 200 });
+ expect(result.current.columnSizing).toStrictEqual({ a: 200 });
});
it('setColumnOrder updates order from column array', () => {
@@ -237,7 +242,7 @@ describe('useColumnState', () => {
result.current.setColumnOrder([col('c'), col('a'), col('b')]);
});
- expect(result.current.sortedColumns.map((c) => c.id)).toEqual([
+ expect(result.current.sortedColumns.map((c) => c.id)).toStrictEqual([
'c',
'a',
'b',
diff --git a/frontend/src/components/TanStackTableView/__tests__/useColumnStore.test.ts b/frontend/src/components/TanStackTableView/__tests__/useColumnStore.test.ts
index e2c87f7920..0c8ac69147 100644
--- a/frontend/src/components/TanStackTableView/__tests__/useColumnStore.test.ts
+++ b/frontend/src/components/TanStackTableView/__tests__/useColumnStore.test.ts
@@ -29,9 +29,9 @@ describe('useColumnStore', () => {
});
const state = useColumnStore.getState().tables[TEST_KEY];
- expect(state.hiddenColumnIds).toEqual(['b']);
- expect(state.columnOrder).toEqual([]);
- expect(state.columnSizing).toEqual({});
+ expect(state.hiddenColumnIds).toStrictEqual(['b']);
+ expect(state.columnOrder).toStrictEqual([]);
+ expect(state.columnSizing).toStrictEqual({});
});
it('does not reinitialize if already exists', () => {
@@ -124,7 +124,9 @@ describe('useColumnStore', () => {
.getState()
.setColumnSizing(TEST_KEY, { col1: 200, col2: 300 });
});
- expect(useColumnStore.getState().tables[TEST_KEY].columnSizing).toEqual({
+ expect(
+ useColumnStore.getState().tables[TEST_KEY].columnSizing,
+ ).toStrictEqual({
col1: 200,
col2: 300,
});
@@ -144,11 +146,9 @@ describe('useColumnStore', () => {
.getState()
.setColumnOrder(TEST_KEY, ['col2', 'col1', 'col3']);
});
- expect(useColumnStore.getState().tables[TEST_KEY].columnOrder).toEqual([
- 'col2',
- 'col1',
- 'col3',
- ]);
+ expect(useColumnStore.getState().tables[TEST_KEY].columnOrder).toStrictEqual(
+ ['col2', 'col1', 'col3'],
+ );
});
});
@@ -172,9 +172,9 @@ describe('useColumnStore', () => {
});
const state = useColumnStore.getState().tables[TEST_KEY];
- expect(state.hiddenColumnIds).toEqual(['a']);
- expect(state.columnOrder).toEqual([]);
- expect(state.columnSizing).toEqual({});
+ expect(state.hiddenColumnIds).toStrictEqual(['a']);
+ expect(state.columnOrder).toStrictEqual([]);
+ expect(state.columnSizing).toStrictEqual({});
});
});
@@ -195,7 +195,7 @@ describe('useColumnStore', () => {
});
const state = useColumnStore.getState().tables[TEST_KEY];
- expect(state.hiddenColumnIds).toEqual(['col1', 'col3']);
+ expect(state.hiddenColumnIds).toStrictEqual(['col1', 'col3']);
expect(state.hiddenColumnIds).not.toContain('col2');
});
@@ -216,7 +216,7 @@ describe('useColumnStore', () => {
});
const stateAfter = useColumnStore.getState().tables[TEST_KEY];
- expect(stateAfter.hiddenColumnIds).toEqual(hiddenBefore);
+ expect(stateAfter.hiddenColumnIds).toStrictEqual(hiddenBefore);
});
it('does nothing for unknown storage key', () => {
@@ -242,7 +242,7 @@ describe('useColumnStore', () => {
});
const { result } = renderHook(() => useHiddenColumnIds(TEST_KEY));
- expect(result.current).toEqual(['a']);
+ expect(result.current).toStrictEqual(['a']);
});
it('useHiddenColumnIds returns a stable snapshot for persisted state', () => {
@@ -270,7 +270,7 @@ describe('useColumnStore', () => {
});
const { result } = renderHook(() => useColumnSizing(TEST_KEY));
- expect(result.current).toEqual({ col1: 150 });
+ expect(result.current).toStrictEqual({ col1: 150 });
});
it('useColumnOrder returns order', () => {
@@ -280,7 +280,7 @@ describe('useColumnStore', () => {
});
const { result } = renderHook(() => useColumnOrder(TEST_KEY));
- expect(result.current).toEqual(['c', 'b', 'a']);
+ expect(result.current).toStrictEqual(['c', 'b', 'a']);
});
it('returns empty defaults for unknown storageKey', () => {
@@ -288,9 +288,9 @@ describe('useColumnStore', () => {
const { result: sizing } = renderHook(() => useColumnSizing('unknown'));
const { result: order } = renderHook(() => useColumnOrder('unknown'));
- expect(hidden.current).toEqual([]);
- expect(sizing.current).toEqual({});
- expect(order.current).toEqual([]);
+ expect(hidden.current).toStrictEqual([]);
+ expect(sizing.current).toStrictEqual({});
+ expect(order.current).toStrictEqual([]);
});
});
});
diff --git a/frontend/src/components/TanStackTableView/__tests__/useTableParams.test.tsx b/frontend/src/components/TanStackTableView/__tests__/useTableParams.test.tsx
index c30f037e11..ad279be5de 100644
--- a/frontend/src/components/TanStackTableView/__tests__/useTableParams.test.tsx
+++ b/frontend/src/components/TanStackTableView/__tests__/useTableParams.test.tsx
@@ -80,7 +80,10 @@ describe('useTableParams (local mode — enableQueryParams not set)', () => {
act(() => {
result.current.setOrderBy({ columnName: 'cpu', order: 'desc' });
});
- expect(result.current.orderBy).toEqual({ columnName: 'cpu', order: 'desc' });
+ expect(result.current.orderBy).toStrictEqual({
+ columnName: 'cpu',
+ order: 'desc',
+ });
});
});
@@ -143,7 +146,10 @@ describe('useTableParams (URL mode — enableQueryParams set)', () => {
const orderBy = JSON.stringify({ columnName: 'name', order: 'desc' });
const wrapper = createNuqsWrapper({ order_by: orderBy });
const { result } = renderHook(() => useTableParams(true), { wrapper });
- expect(result.current.orderBy).toEqual({ columnName: 'name', order: 'desc' });
+ expect(result.current.orderBy).toStrictEqual({
+ columnName: 'name',
+ order: 'desc',
+ });
});
it('updates URL when setPage is called', () => {
@@ -178,7 +184,7 @@ describe('useTableParams (URL mode — enableQueryParams set)', () => {
.filter(Boolean)
.pop();
expect(lastOrderBy).toBeDefined();
- expect(JSON.parse(lastOrderBy!)).toEqual({
+ expect(JSON.parse(lastOrderBy!)).toStrictEqual({
columnName: 'value',
order: 'asc',
});
@@ -207,7 +213,7 @@ describe('useTableParams (URL mode — enableQueryParams set)', () => {
result.current.setExpanded({ 'row-1': true });
});
- expect(result.current.expanded).toEqual({ 'row-1': true });
+ expect(result.current.expanded).toStrictEqual({ 'row-1': true });
});
it('toggles sort order correctly: null → asc → desc → null', () => {
@@ -222,13 +228,19 @@ describe('useTableParams (URL mode — enableQueryParams set)', () => {
act(() => {
result.current.setOrderBy({ columnName: 'id', order: 'asc' });
});
- expect(result.current.orderBy).toEqual({ columnName: 'id', order: 'asc' });
+ expect(result.current.orderBy).toStrictEqual({
+ columnName: 'id',
+ order: 'asc',
+ });
// Second click: asc → desc
act(() => {
result.current.setOrderBy({ columnName: 'id', order: 'desc' });
});
- expect(result.current.orderBy).toEqual({ columnName: 'id', order: 'desc' });
+ expect(result.current.orderBy).toStrictEqual({
+ columnName: 'id',
+ order: 'desc',
+ });
// Third click: desc → null
act(() => {
diff --git a/frontend/src/components/YAxisUnitSelector/__tests__/formatter.test.tsx b/frontend/src/components/YAxisUnitSelector/__tests__/formatter.test.tsx
index 71e2c5bbd5..140b1cd77d 100644
--- a/frontend/src/components/YAxisUnitSelector/__tests__/formatter.test.tsx
+++ b/frontend/src/components/YAxisUnitSelector/__tests__/formatter.test.tsx
@@ -8,7 +8,7 @@ import { formatUniversalUnit } from '../formatter';
describe('formatUniversalUnit', () => {
describe('Time', () => {
- test.each([
+ it.each([
// Days
[31, UniversalYAxisUnit.DAYS, '4.43 weeks'],
[7, UniversalYAxisUnit.DAYS, '1 week'],
@@ -48,7 +48,7 @@ describe('formatUniversalUnit', () => {
});
describe('Data', () => {
- test.each([
+ it.each([
// Bytes
[864, UniversalYAxisUnit.BYTES, '864 B'],
[1000, UniversalYAxisUnit.BYTES, '1 kB'],
@@ -91,7 +91,7 @@ describe('formatUniversalUnit', () => {
});
describe('Data rate', () => {
- test.each([
+ it.each([
// Bytes/second
[864, UniversalYAxisUnit.BYTES_SECOND, '864 B/s'],
[1000, UniversalYAxisUnit.BYTES_SECOND, '1 kB/s'],
@@ -134,7 +134,7 @@ describe('formatUniversalUnit', () => {
});
describe('Bit', () => {
- test.each([
+ it.each([
// Bits
[1, UniversalYAxisUnit.BITS, '1 b'],
[250, UniversalYAxisUnit.BITS, '250 b'],
@@ -186,7 +186,7 @@ describe('formatUniversalUnit', () => {
});
describe('Bit rate', () => {
- test.each([
+ it.each([
// Bits/second
[512, UniversalYAxisUnit.BITS_SECOND, '512 b/s'],
[1000, UniversalYAxisUnit.BITS_SECOND, '1 kb/s'],
@@ -236,7 +236,7 @@ describe('formatUniversalUnit', () => {
});
describe('Count', () => {
- test.each([
+ it.each([
[100, UniversalYAxisUnit.COUNT, '100'],
[875, UniversalYAxisUnit.COUNT, '875'],
[1000, UniversalYAxisUnit.COUNT, '1 K'],
@@ -256,7 +256,7 @@ describe('formatUniversalUnit', () => {
expect(formatUniversalUnit(value, unit)).toBe(expected);
});
- test.each([
+ it.each([
[100, UniversalYAxisUnit.COUNT_SECOND, '100 c/s'],
[875, UniversalYAxisUnit.COUNT_SECOND, '875 c/s'],
[1000, UniversalYAxisUnit.COUNT_SECOND, '1K c/s'],
@@ -267,7 +267,7 @@ describe('formatUniversalUnit', () => {
expect(formatUniversalUnit(value, unit)).toBe(expected);
});
- test.each([
+ it.each([
[100, UniversalYAxisUnit.COUNT_MINUTE, '100 c/m'],
[875, UniversalYAxisUnit.COUNT_MINUTE, '875 c/m'],
[1000, UniversalYAxisUnit.COUNT_MINUTE, '1K c/m'],
@@ -280,7 +280,7 @@ describe('formatUniversalUnit', () => {
});
describe('Operations units', () => {
- test.each([
+ it.each([
[780, UniversalYAxisUnit.OPS_SECOND, '780 ops/s'],
[1000, UniversalYAxisUnit.OPS_SECOND, '1K ops/s'],
[520, UniversalYAxisUnit.OPS_MINUTE, '520 ops/m'],
@@ -297,7 +297,7 @@ describe('formatUniversalUnit', () => {
});
describe('Request units', () => {
- test.each([
+ it.each([
[615, UniversalYAxisUnit.REQUESTS_SECOND, '615 req/s'],
[1000, UniversalYAxisUnit.REQUESTS_SECOND, '1K req/s'],
[480, UniversalYAxisUnit.REQUESTS_MINUTE, '480 req/m'],
@@ -311,7 +311,7 @@ describe('formatUniversalUnit', () => {
});
describe('Read/Write units', () => {
- test.each([
+ it.each([
[505, UniversalYAxisUnit.READS_SECOND, '505 rd/s'],
[1000, UniversalYAxisUnit.READS_SECOND, '1K rd/s'],
[610, UniversalYAxisUnit.WRITES_SECOND, '610 wr/s'],
@@ -335,7 +335,7 @@ describe('formatUniversalUnit', () => {
});
describe('IO Operations units', () => {
- test.each([
+ it.each([
[777, UniversalYAxisUnit.IOOPS_SECOND, '777 io/s'],
[1000, UniversalYAxisUnit.IOOPS_SECOND, '1K io/s'],
[2500, UniversalYAxisUnit.IOOPS_SECOND, '2.5K io/s'],
@@ -363,7 +363,7 @@ describe('formatUniversalUnit', () => {
});
describe('Time (additional)', () => {
- test.each([
+ it.each([
[900, UniversalYAxisUnit.DURATION_MS, '900 milliseconds'],
[1000, UniversalYAxisUnit.DURATION_MS, '1 second'],
[1, UniversalYAxisUnit.DURATION_MS, '1 millisecond'],
@@ -388,7 +388,7 @@ describe('formatUniversalUnit', () => {
});
describe('Data (IEC/Binary)', () => {
- test.each([
+ it.each([
// Bytes
[900, UniversalYAxisUnit.BYTES_IEC, '900 B'],
[1024, UniversalYAxisUnit.BYTES_IEC, '1 KiB'],
@@ -430,7 +430,7 @@ describe('formatUniversalUnit', () => {
});
describe('Data Rate (IEC/Binary)', () => {
- test.each([
+ it.each([
// Kibibytes/second
[900, UniversalYAxisUnit.KIBIBYTES_SECOND, '900 KiB/s'],
[1024, UniversalYAxisUnit.KIBIBYTES_SECOND, '1 MiB/s'],
@@ -473,7 +473,7 @@ describe('formatUniversalUnit', () => {
});
describe('Bits (IEC)', () => {
- test.each([
+ it.each([
[900, UniversalYAxisUnit.BITS_IEC, '900 b'],
[1024, UniversalYAxisUnit.BITS_IEC, '1 Kib'],
[1080, UniversalYAxisUnit.BITS_IEC, '1.05 Kib'],
@@ -483,7 +483,7 @@ describe('formatUniversalUnit', () => {
});
describe('Hash Rate', () => {
- test.each([
+ it.each([
// Hashes/second
[412, UniversalYAxisUnit.HASH_RATE_HASHES_PER_SECOND, '412 H/s'],
[1000, UniversalYAxisUnit.HASH_RATE_HASHES_PER_SECOND, '1 kH/s'],
@@ -518,7 +518,7 @@ describe('formatUniversalUnit', () => {
});
describe('Miscellaneous', () => {
- test.each([
+ it.each([
[742, UniversalYAxisUnit.MISC_STRING, '742'],
[688, UniversalYAxisUnit.MISC_SHORT, '688'],
[555, UniversalYAxisUnit.MISC_HUMIDITY, '555 %H'],
@@ -534,7 +534,7 @@ describe('formatUniversalUnit', () => {
});
describe('Acceleration', () => {
- test.each([
+ it.each([
[
875,
UniversalYAxisUnit.ACCELERATION_METERS_PER_SECOND_SQUARED,
@@ -553,7 +553,7 @@ describe('formatUniversalUnit', () => {
});
describe('Angular', () => {
- test.each([
+ it.each([
[415, UniversalYAxisUnit.ANGULAR_DEGREE, '415 °'],
[732, UniversalYAxisUnit.ANGULAR_RADIAN, '732 rad'],
[128, UniversalYAxisUnit.ANGULAR_GRADIAN, '128 grad'],
@@ -565,7 +565,7 @@ describe('formatUniversalUnit', () => {
});
describe('Area', () => {
- test.each([
+ it.each([
[210, UniversalYAxisUnit.AREA_SQUARE_METERS, '210 m²'],
[152, UniversalYAxisUnit.AREA_SQUARE_FEET, '152 ft²'],
[64, UniversalYAxisUnit.AREA_SQUARE_MILES, '64 mi²'],
@@ -575,7 +575,7 @@ describe('formatUniversalUnit', () => {
});
describe('FLOPs', () => {
- test.each([
+ it.each([
// FLOPS
[150, UniversalYAxisUnit.FLOPS_FLOPS, '150 FLOPS'],
[1000, UniversalYAxisUnit.FLOPS_FLOPS, '1 kFLOPS'],
@@ -613,7 +613,7 @@ describe('formatUniversalUnit', () => {
});
describe('Concentration', () => {
- test.each([
+ it.each([
[415, UniversalYAxisUnit.CONCENTRATION_PPM, '415 ppm'],
[1000, UniversalYAxisUnit.CONCENTRATION_PPM, '1000 ppm'],
[732, UniversalYAxisUnit.CONCENTRATION_PPB, '732 ppb'],
@@ -650,7 +650,7 @@ describe('formatUniversalUnit', () => {
});
describe('Currency', () => {
- test.each([
+ it.each([
[812, UniversalYAxisUnit.CURRENCY_USD, '$812'],
[645, UniversalYAxisUnit.CURRENCY_GBP, '£645'],
[731, UniversalYAxisUnit.CURRENCY_EUR, '€731'],
@@ -688,7 +688,7 @@ describe('formatUniversalUnit', () => {
});
describe('Power/Electrical', () => {
- test.each([
+ it.each([
[715, UniversalYAxisUnit.POWER_WATT, '715 W'],
[1000, UniversalYAxisUnit.POWER_WATT, '1 kW'],
[1080, UniversalYAxisUnit.POWER_WATT, '1.08 kW'],
@@ -744,7 +744,7 @@ describe('formatUniversalUnit', () => {
});
describe('Flow', () => {
- test.each([
+ it.each([
[512, UniversalYAxisUnit.FLOW_GALLONS_PER_MINUTE, '512 gpm'],
[1000, UniversalYAxisUnit.FLOW_GALLONS_PER_MINUTE, '1000 gpm'],
[678, UniversalYAxisUnit.FLOW_CUBIC_METERS_PER_SECOND, '678 cms'],
@@ -766,7 +766,7 @@ describe('formatUniversalUnit', () => {
});
describe('Force', () => {
- test.each([
+ it.each([
[845, UniversalYAxisUnit.FORCE_NEWTON_METERS, '845 Nm'],
[1000, UniversalYAxisUnit.FORCE_NEWTON_METERS, '1 kNm'],
[1080, UniversalYAxisUnit.FORCE_NEWTON_METERS, '1.08 kNm'],
@@ -782,7 +782,7 @@ describe('formatUniversalUnit', () => {
});
describe('Mass', () => {
- test.each([
+ it.each([
[120, UniversalYAxisUnit.MASS_MILLIGRAM, '120 mg'],
[120000, UniversalYAxisUnit.MASS_MILLIGRAM, '120 g'],
[987, UniversalYAxisUnit.MASS_GRAM, '987 g'],
@@ -796,7 +796,7 @@ describe('formatUniversalUnit', () => {
});
describe('Length', () => {
- test.each([
+ it.each([
[88, UniversalYAxisUnit.LENGTH_MILLIMETER, '88 mm'],
[100, UniversalYAxisUnit.LENGTH_MILLIMETER, '100 mm'],
[1000, UniversalYAxisUnit.LENGTH_MILLIMETER, '1 m'],
@@ -812,7 +812,7 @@ describe('formatUniversalUnit', () => {
});
describe('Pressure', () => {
- test.each([
+ it.each([
[45, UniversalYAxisUnit.PRESSURE_MILLIBAR, '45 mbar'],
[1013, UniversalYAxisUnit.PRESSURE_MILLIBAR, '1.01 bar'],
[27, UniversalYAxisUnit.PRESSURE_BAR, '27 bar'],
@@ -828,7 +828,7 @@ describe('formatUniversalUnit', () => {
});
describe('Radiation', () => {
- test.each([
+ it.each([
[452, UniversalYAxisUnit.RADIATION_BECQUEREL, '452 Bq'],
[37, UniversalYAxisUnit.RADIATION_CURIE, '37 Ci'],
[128, UniversalYAxisUnit.RADIATION_GRAY, '128 Gy'],
@@ -849,7 +849,7 @@ describe('formatUniversalUnit', () => {
});
describe('Rotation Speed', () => {
- test.each([
+ it.each([
[345, UniversalYAxisUnit.ROTATION_SPEED_REVOLUTIONS_PER_MINUTE, '345 rpm'],
[789, UniversalYAxisUnit.ROTATION_SPEED_HERTZ, '789 Hz'],
[789000, UniversalYAxisUnit.ROTATION_SPEED_HERTZ, '789 kHz'],
@@ -861,7 +861,7 @@ describe('formatUniversalUnit', () => {
});
describe('Temperature', () => {
- test.each([
+ it.each([
[37, UniversalYAxisUnit.TEMPERATURE_CELSIUS, '37 °C'],
[451, UniversalYAxisUnit.TEMPERATURE_FAHRENHEIT, '451 °F'],
[310, UniversalYAxisUnit.TEMPERATURE_KELVIN, '310 K'],
@@ -871,7 +871,7 @@ describe('formatUniversalUnit', () => {
});
describe('Velocity', () => {
- test.each([
+ it.each([
[900, UniversalYAxisUnit.VELOCITY_METERS_PER_SECOND, '900 m/s'],
[456, UniversalYAxisUnit.VELOCITY_KILOMETERS_PER_HOUR, '456 km/h'],
[789, UniversalYAxisUnit.VELOCITY_MILES_PER_HOUR, '789 mph'],
@@ -882,7 +882,7 @@ describe('formatUniversalUnit', () => {
});
describe('Volume', () => {
- test.each([
+ it.each([
[1200, UniversalYAxisUnit.VOLUME_MILLILITER, '1.2 L'],
[9000000, UniversalYAxisUnit.VOLUME_MILLILITER, '9 kL'],
[9, UniversalYAxisUnit.VOLUME_LITER, '9 L'],
diff --git a/frontend/src/components/YAxisUnitSelector/__tests__/utils.test.tsx b/frontend/src/components/YAxisUnitSelector/__tests__/utils.test.tsx
index ef7c8a0f89..5957dfc419 100644
--- a/frontend/src/components/YAxisUnitSelector/__tests__/utils.test.tsx
+++ b/frontend/src/components/YAxisUnitSelector/__tests__/utils.test.tsx
@@ -16,8 +16,8 @@ describe('YAxisUnitSelector utils', () => {
it('returns null or self for unknown units', () => {
expect(mapMetricUnitToUniversalUnit('unknown_unit')).toBe('unknown_unit');
- expect(mapMetricUnitToUniversalUnit('')).toBe(null);
- expect(mapMetricUnitToUniversalUnit(undefined)).toBe(null);
+ expect(mapMetricUnitToUniversalUnit('')).toBeNull();
+ expect(mapMetricUnitToUniversalUnit(undefined)).toBeNull();
});
});
@@ -62,7 +62,7 @@ describe('YAxisUnitSelector utils', () => {
},
];
const mergedCategories = mergeCategories(categories1, categories2);
- expect(mergedCategories).toEqual([
+ expect(mergedCategories).toStrictEqual([
{
name: YAxisCategoryNames.Data,
units: [
diff --git a/frontend/src/components/cmdKPalette/__test__/cmdkPalette.test.tsx b/frontend/src/components/cmdKPalette/__test__/cmdkPalette.test.tsx
index deb5ea3124..fb748815da 100644
--- a/frontend/src/components/cmdKPalette/__test__/cmdkPalette.test.tsx
+++ b/frontend/src/components/cmdKPalette/__test__/cmdkPalette.test.tsx
@@ -149,7 +149,7 @@ describe('CmdKPalette', () => {
jest.clearAllMocks();
});
- test('renders navigation and settings groups and items', () => {
+ it('renders navigation and settings groups and items', () => {
render(<CmdKPalette userRole="ADMIN" />);
expect(screen.getByText('Navigation')).toBeInTheDocument();
@@ -160,7 +160,7 @@ describe('CmdKPalette', () => {
expect(screen.getByText('Switch to Dark Mode')).toBeInTheDocument();
});
- test('clicking a navigation item calls history.push with correct route', async () => {
+ it('clicking a navigation item calls history.push with correct route', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
render(<CmdKPalette userRole="ADMIN" />);
@@ -170,14 +170,14 @@ describe('CmdKPalette', () => {
expect(history.push).toHaveBeenCalledWith(ROUTES.HOME);
});
- test('role-based filtering (basic smoke)', () => {
+ it('role-based filtering (basic smoke)', () => {
render(<CmdKPalette userRole="VIEWER" />);
// VIEWER still sees basic navigation items
expect(screen.getByText(HOME_LABEL)).toBeInTheDocument();
});
- test('keyboard shortcut opens palette via setOpen', () => {
+ it('keyboard shortcut opens palette via setOpen', () => {
render(<CmdKPalette userRole="ADMIN" />);
const event = new KeyboardEvent('keydown', { key: 'k', ctrlKey: true });
@@ -186,7 +186,7 @@ describe('CmdKPalette', () => {
expect(mockSetOpen).toHaveBeenCalledWith(true);
});
- test('items render with icons when provided', () => {
+ it('items render with icons when provided', () => {
render(<CmdKPalette userRole="ADMIN" />);
const iconHolders = document.querySelectorAll('.cmd-item-icon');
@@ -194,7 +194,7 @@ describe('CmdKPalette', () => {
expect(screen.getByText(HOME_LABEL)).toBeInTheDocument();
});
- test('closing the palette via handleInvoke sets open to false', async () => {
+ it('closing the palette via handleInvoke sets open to false', async () => {
const user = userEvent.setup({ pointerEventsCheck: 0 });
render(<CmdKPalette userRole="ADMIN" />);
diff --git a/frontend/src/container/AllAlertChannels/__tests__/AlertChannels.test.tsx b/frontend/src/container/AllAlertChannels/__tests__/AlertChannels.test.tsx
index 0af74e3d07..107713eb5b 100644
--- a/frontend/src/container/AllAlertChannels/__tests__/AlertChannels.test.tsx
+++ b/frontend/src/container/AllAlertChannels/__tests__/AlertChannels.test.tsx
@@ -34,13 +34,13 @@ describe('Alert Channels Settings List page', () => {
jest.useRealTimers();
});
describe('Should display the Alert Channels page properly', () => {
- it('Should check if "The alerts will be sent to all the configured channels." is visible ', () => {
+ it('Should check if "The alerts will be sent to all the configured channels." is visible', () => {
expect(screen.getByText('sending_channels_note')).toBeInTheDocument();
});
- it('Should check if "New Alert Channel" Button is visble ', () => {
+ it('Should check if "New Alert Channel" Button is visble', () => {
expect(screen.getByText('button_new_channel')).toBeInTheDocument();
});
- it('Should check if the help icon is visible and displays "tooltip_notification_channels ', async () => {
+ it('Should check if the help icon is visible and displays "tooltip_notification_channels', async () => {
const helpIcon = screen.getByLabelText('question-circle');
fireEvent.mouseOver(helpIcon);
diff --git a/frontend/src/container/AllAlertChannels/__tests__/AlertChannelsNormalUser.test.tsx b/frontend/src/container/AllAlertChannels/__tests__/AlertChannelsNormalUser.test.tsx
index ce69c98b61..d5eccd51c1 100644
--- a/frontend/src/container/AllAlertChannels/__tests__/AlertChannelsNormalUser.test.tsx
+++ b/frontend/src/container/AllAlertChannels/__tests__/AlertChannelsNormalUser.test.tsx
@@ -38,7 +38,7 @@ describe('Alert Channels Settings List page (Normal User)', () => {
jest.useRealTimers();
});
describe('Should display the Alert Channels page properly', () => {
- it('Should check if "The alerts will be sent to all the configured channels." is visible ', async () => {
+ it('Should check if "The alerts will be sent to all the configured channels." is visible', async () => {
await waitFor(() =>
expect(screen.getByText('sending_channels_note')).toBeInTheDocument(),
);
@@ -51,7 +51,7 @@ describe('Alert Channels Settings List page (Normal User)', () => {
await waitFor(() => expect(newAlertButton).toBeInTheDocument());
expect(newAlertButton).toBeDisabled();
});
- it('Should check if the help icon is visible and displays "tooltip_notification_channels ', async () => {
+ it('Should check if the help icon is visible and displays "tooltip_notification_channels', async () => {
const helpIcon = screen.getByLabelText('question-circle');
fireEvent.mouseOver(helpIcon);
diff --git a/frontend/src/container/AllAlertChannels/__tests__/CreateAlertChannel.test.tsx b/frontend/src/container/AllAlertChannels/__tests__/CreateAlertChannel.test.tsx
index 63d142a744..83ab7e33ab 100644
--- a/frontend/src/container/AllAlertChannels/__tests__/CreateAlertChannel.test.tsx
+++ b/frontend/src/container/AllAlertChannels/__tests__/CreateAlertChannel.test.tsx
@@ -44,7 +44,7 @@ describe('Create Alert Channel', () => {
afterEach(() => {
jest.clearAllMocks();
});
- describe('Should check if the new alert channel is properly displayed with the cascading fields of slack channel ', () => {
+ describe('Should check if the new alert channel is properly displayed with the cascading fields of slack channel', () => {
beforeEach(() => {
render(<CreateAlertChannels preType={ChannelType.Slack} />);
});
@@ -54,13 +54,13 @@ describe('Create Alert Channel', () => {
it('Should check if the title is "New Notification Channels"', () => {
expect(screen.getByText('page_title_create')).toBeInTheDocument();
});
- it('Should check if the name label and textbox are displayed properly ', () => {
+ it('Should check if the name label and textbox are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_channel_name',
testId: 'channel-name-textbox',
});
});
- it('Should check if Send resolved alerts label and checkbox are displayed properly ', () => {
+ it('Should check if Send resolved alerts label and checkbox are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_send_resolved',
testId: 'field-send-resolved-checkbox',
@@ -76,13 +76,13 @@ describe('Create Alert Channel', () => {
it('Should check if the selected item in the type dropdown has text "Slack"', () => {
expect(screen.getByText('Slack')).toBeInTheDocument();
});
- it('Should check if Webhook URL label and input are displayed properly ', () => {
+ it('Should check if Webhook URL label and input are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_webhook_url',
testId: 'webhook-url-textbox',
});
});
- it('Should check if Recepient label, input, and help text are displayed properly ', () => {
+ it('Should check if Recepient label, input, and help text are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_slack_recipient',
testId: 'slack-channel-textbox',
@@ -90,7 +90,7 @@ describe('Create Alert Channel', () => {
});
});
- it('Should check if Title label and text area are displayed properly ', () => {
+ it('Should check if Title label and text area are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_slack_title',
testId: 'title-textarea',
@@ -101,7 +101,7 @@ describe('Create Alert Channel', () => {
expect(titleTextArea).toHaveTextContent(slackTitleDefaultValue);
});
- it('Should check if Description label and text area are displayed properly ', () => {
+ it('Should check if Description label and text area are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_slack_description',
testId: 'description-textarea',
@@ -177,13 +177,13 @@ describe('Create Alert Channel', () => {
it('Should check if the selected item in the type dropdown has text "Webhook"', () => {
expect(screen.getByText('Webhook')).toBeInTheDocument();
});
- it('Should check if Webhook URL label and input are displayed properly ', () => {
+ it('Should check if Webhook URL label and input are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_webhook_url',
testId: 'webhook-url-textbox',
});
});
- it('Should check if Webhook User Name label, input, and help text are displayed properly ', () => {
+ it('Should check if Webhook User Name label, input, and help text are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_webhook_username',
testId: 'webhook-username-textbox',
@@ -321,7 +321,7 @@ describe('Create Alert Channel', () => {
});
});
- it('Should check if Message contains the default template ', () => {
+ it('Should check if Message contains the default template', () => {
const messageTextArea = screen.getByTestId('opsgenie-message-textarea');
expect(messageTextArea).toHaveValue(opsGenieMessageDefaultValue);
@@ -387,14 +387,14 @@ describe('Create Alert Channel', () => {
expect(screen.getByText('Microsoft Teams')).toBeInTheDocument();
});
- it('Should check if Webhook URL label and input are displayed properly ', () => {
+ it('Should check if Webhook URL label and input are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_webhook_url',
testId: 'webhook-url-textbox',
});
});
- it('Should check if Title label and text area are displayed properly ', () => {
+ it('Should check if Title label and text area are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_slack_title',
testId: 'title-textarea',
@@ -406,7 +406,7 @@ describe('Create Alert Channel', () => {
expect(titleTextArea).toHaveTextContent(slackTitleDefaultValue);
});
- it('Should check if Description label and text area are displayed properly ', () => {
+ it('Should check if Description label and text area are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_slack_description',
testId: 'description-textarea',
diff --git a/frontend/src/container/AllAlertChannels/__tests__/CreateAlertChannelNormalUser.test.tsx b/frontend/src/container/AllAlertChannels/__tests__/CreateAlertChannelNormalUser.test.tsx
index ac4ccb962e..f1b77f843a 100644
--- a/frontend/src/container/AllAlertChannels/__tests__/CreateAlertChannelNormalUser.test.tsx
+++ b/frontend/src/container/AllAlertChannels/__tests__/CreateAlertChannelNormalUser.test.tsx
@@ -23,20 +23,20 @@ describe('Create Alert Channel (Normal User)', () => {
afterEach(() => {
jest.clearAllMocks();
});
- describe('Should check if the new alert channel is properly displayed with the cascading fields of slack channel ', () => {
+ describe('Should check if the new alert channel is properly displayed with the cascading fields of slack channel', () => {
beforeEach(() => {
render(<CreateAlertChannels preType={ChannelType.Slack} />);
});
it('Should check if the title is "New Notification Channels"', () => {
expect(screen.getByText('page_title_create')).toBeInTheDocument();
});
- it('Should check if the name label and textbox are displayed properly ', () => {
+ it('Should check if the name label and textbox are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_channel_name',
testId: 'channel-name-textbox',
});
});
- it('Should check if Send resolved alerts label and checkbox are displayed properly ', () => {
+ it('Should check if Send resolved alerts label and checkbox are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_send_resolved',
testId: 'field-send-resolved-checkbox',
@@ -52,13 +52,13 @@ describe('Create Alert Channel (Normal User)', () => {
it('Should check if the selected item in the type dropdown has text "Slack"', () => {
expect(screen.getByText('Slack')).toBeInTheDocument();
});
- it('Should check if Webhook URL label and input are displayed properly ', () => {
+ it('Should check if Webhook URL label and input are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_webhook_url',
testId: 'webhook-url-textbox',
});
});
- it('Should check if Recepient label, input, and help text are displayed properly ', () => {
+ it('Should check if Recepient label, input, and help text are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_slack_recipient',
testId: 'slack-channel-textbox',
@@ -66,7 +66,7 @@ describe('Create Alert Channel (Normal User)', () => {
});
});
- it('Should check if Title label and text area are displayed properly ', () => {
+ it('Should check if Title label and text area are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_slack_title',
testId: 'title-textarea',
@@ -77,7 +77,7 @@ describe('Create Alert Channel (Normal User)', () => {
expect(titleTextArea).toHaveTextContent(slackTitleDefaultValue);
});
- it('Should check if Description label and text area are displayed properly ', () => {
+ it('Should check if Description label and text area are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_slack_description',
testId: 'description-textarea',
@@ -103,13 +103,13 @@ describe('Create Alert Channel (Normal User)', () => {
it('Should check if the selected item in the type dropdown has text "Webhook"', () => {
expect(screen.getByText('Webhook')).toBeInTheDocument();
});
- it('Should check if Webhook URL label and input are displayed properly ', () => {
+ it('Should check if Webhook URL label and input are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_webhook_url',
testId: 'webhook-url-textbox',
});
});
- it('Should check if Webhook User Name label, input, and help text are displayed properly ', () => {
+ it('Should check if Webhook User Name label, input, and help text are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_webhook_username',
testId: 'webhook-username-textbox',
@@ -247,7 +247,7 @@ describe('Create Alert Channel (Normal User)', () => {
});
});
- it('Should check if Message contains the default template ', () => {
+ it('Should check if Message contains the default template', () => {
const messageTextArea = screen.getByTestId('opsgenie-message-textarea');
expect(messageTextArea).toHaveValue(opsGenieMessageDefaultValue);
diff --git a/frontend/src/container/AllAlertChannels/__tests__/EditAlertChannel.test.tsx b/frontend/src/container/AllAlertChannels/__tests__/EditAlertChannel.test.tsx
index 0c58900be6..a0dac0e039 100644
--- a/frontend/src/container/AllAlertChannels/__tests__/EditAlertChannel.test.tsx
+++ b/frontend/src/container/AllAlertChannels/__tests__/EditAlertChannel.test.tsx
@@ -24,7 +24,7 @@ jest.mock('components/MarkdownRenderer/MarkdownRenderer', () => ({
MarkdownRenderer: jest.fn(() => <div>Mocked MarkdownRenderer</div>),
}));
-describe('Should check if the edit alert channel is properly displayed ', () => {
+describe('Should check if the edit alert channel is properly displayed', () => {
beforeEach(() => {
render(<EditAlertChannels initialValue={editAlertChannelInitialValue} />);
});
@@ -35,14 +35,14 @@ describe('Should check if the edit alert channel is properly displayed ', () =>
expect(screen.getByText('page_title_edit')).toBeInTheDocument();
});
- it('Should check if the name label and textbox are displayed properly ', () => {
+ it('Should check if the name label and textbox are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_channel_name',
testId: 'channel-name-textbox',
value: 'Dummy-Channel',
});
});
- it('Should check if Send resolved alerts label and checkbox are displayed properly and the checkbox is checked ', () => {
+ it('Should check if Send resolved alerts label and checkbox are displayed properly and the checkbox is checked', () => {
testLabelInputAndHelpValue({
labelText: 'field_send_resolved',
testId: 'field-send-resolved-checkbox',
@@ -61,7 +61,7 @@ describe('Should check if the edit alert channel is properly displayed ', () =>
expect(screen.getByText('Slack')).toBeInTheDocument();
});
- it('Should check if Webhook URL label and input are displayed properly ', () => {
+ it('Should check if Webhook URL label and input are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_webhook_url',
testId: 'webhook-url-textbox',
@@ -70,7 +70,7 @@ describe('Should check if the edit alert channel is properly displayed ', () =>
});
});
- it('Should check if Recepient label, input, and help text are displayed properly ', () => {
+ it('Should check if Recepient label, input, and help text are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_slack_recipient',
testId: 'slack-channel-textbox',
@@ -79,7 +79,7 @@ describe('Should check if the edit alert channel is properly displayed ', () =>
});
});
- it('Should check if Title label and text area are displayed properly ', () => {
+ it('Should check if Title label and text area are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_slack_title',
testId: 'title-textarea',
@@ -92,7 +92,7 @@ describe('Should check if the edit alert channel is properly displayed ', () =>
expect(titleTextArea).toHaveTextContent(slackTitleDefaultValue);
});
- it('Should check if Description label and text area are displayed properly ', () => {
+ it('Should check if Description label and text area are displayed properly', () => {
testLabelInputAndHelpValue({
labelText: 'field_slack_description',
testId: 'description-textarea',
diff --git a/frontend/src/container/AllError/utils.test.ts b/frontend/src/container/AllError/utils.test.ts
index 344d318ebf..ec60a694f2 100644
--- a/frontend/src/container/AllError/utils.test.ts
+++ b/frontend/src/container/AllError/utils.test.ts
@@ -12,7 +12,7 @@ import {
} from './utils';
describe('Error utils', () => {
- test('Valid OrderBy Params', () => {
+ it('Valid OrderBy Params', () => {
expect(isOrderParams('serviceName')).toBe(true);
expect(isOrderParams('exceptionCount')).toBe(true);
expect(isOrderParams('lastSeen')).toBe(true);
@@ -20,24 +20,24 @@ describe('Error utils', () => {
expect(isOrderParams('exceptionType')).toBe(true);
});
- test('Invalid OrderBy Params', () => {
+ it('Invalid OrderBy Params', () => {
expect(isOrderParams('invalid')).toBe(false);
expect(isOrderParams(null)).toBe(false);
expect(isOrderParams('')).toBe(false);
});
- test('Valid Order', () => {
+ it('Valid Order', () => {
expect(isOrder('ascending')).toBe(true);
expect(isOrder('descending')).toBe(true);
});
- test('Invalid Order', () => {
+ it('Invalid Order', () => {
expect(isOrder('invalid')).toBe(false);
expect(isOrder(null)).toBe(false);
expect(isOrder('')).toBe(false);
});
- test('Default Order', () => {
+ it('Default Order', () => {
const OrderBy: OrderBy[] = [
'exceptionCount',
'exceptionType',
@@ -57,7 +57,7 @@ describe('Error utils', () => {
});
});
- test('Limit', () => {
+ it('Limit', () => {
expect(getLimit(null)).toBe(10);
expect(getLimit('')).toBe(10);
expect(getLimit('0')).toBe(0);
@@ -68,7 +68,7 @@ describe('Error utils', () => {
expect(getLimit('101')).toBe(101);
});
- test('Update Page Size', () => {
+ it('Update Page Size', () => {
expect(getUpdatePageSize(null)).toBe(10);
expect(getUpdatePageSize('')).toBe(10);
expect(getUpdatePageSize('0')).toBe(0);
@@ -79,7 +79,7 @@ describe('Error utils', () => {
expect(getUpdatePageSize('101')).toBe(101);
});
- test('Order Params', () => {
+ it('Order Params', () => {
expect(getOrderParams(null)).toBe('serviceName');
expect(getOrderParams('')).toBe('serviceName');
expect(getOrderParams('serviceName')).toBe('serviceName');
@@ -89,7 +89,7 @@ describe('Error utils', () => {
expect(getOrderParams('exceptionType')).toBe('exceptionType');
});
- test('OffSet', () => {
+ it('OffSet', () => {
expect(getOffSet(null)).toBe(0);
expect(getOffSet('')).toBe(0);
expect(getOffSet('0')).toBe(0);
@@ -100,7 +100,7 @@ describe('Error utils', () => {
expect(getOffSet('101')).toBe(101);
});
- test('Order', () => {
+ it('Order', () => {
expect(getOrder(null)).toBe('ascending');
expect(getOrder('')).toBe('ascending');
expect(getOrder('ascending')).toBe('ascending');
diff --git a/frontend/src/container/AnomalyAlertEvaluationView/AnomalyAlertEvaluationView.tsx b/frontend/src/container/AnomalyAlertEvaluationView/AnomalyAlertEvaluationView.tsx
index 0275f0f85b..372d221404 100644
--- a/frontend/src/container/AnomalyAlertEvaluationView/AnomalyAlertEvaluationView.tsx
+++ b/frontend/src/container/AnomalyAlertEvaluationView/AnomalyAlertEvaluationView.tsx
@@ -30,18 +30,18 @@ function UplotChart({
useEffect(() => {
if (plotInstance.current) {
- // @ts-ignore
+ // @ts-expect-error
plotInstance.current.destroy();
}
if (data && data.length > 0) {
- // @ts-ignore
+ // @ts-expect-error
plotInstance.current = new uPlot(options, data, chartRef.current);
}
return (): void => {
if (plotInstance.current) {
- // @ts-ignore
+ // @ts-expect-error
plotInstance.current.destroy();
}
};
@@ -275,7 +275,7 @@ function AnomalyAlertEvaluationView({
};
const handleSearchValueChange = useDebouncedFn((event): void => {
- // @ts-ignore
+ // @ts-expect-error
const value = event?.target?.value || '';
handleSearch(value);
diff --git a/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/DomainMetrics.test.tsx b/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/DomainMetrics.test.tsx
index ac6e1e9368..ce61ec1cfb 100644
--- a/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/DomainMetrics.test.tsx
+++ b/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/DomainMetrics.test.tsx
@@ -233,7 +233,7 @@ describe('DomainMetrics - V5 Query Payload Tests', () => {
// Wait for skeletons to disappear
await waitFor(() => {
const skeletons = document.querySelectorAll('.ant-skeleton-button');
- expect(skeletons.length).toBe(0);
+ expect(skeletons).toHaveLength(0);
});
// Verify all metric labels are displayed
@@ -272,7 +272,7 @@ describe('DomainMetrics - V5 Query Payload Tests', () => {
await waitFor(() => {
const skeletons = document.querySelectorAll('.ant-skeleton-button');
- expect(skeletons.length).toBe(0);
+ expect(skeletons).toHaveLength(0);
});
// When no data, all values should show "-"
diff --git a/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/EndPointMetrics.test.tsx b/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/EndPointMetrics.test.tsx
index 7225ae1c01..4a42df0d6f 100644
--- a/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/EndPointMetrics.test.tsx
+++ b/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/EndPointMetrics.test.tsx
@@ -303,7 +303,7 @@ describe('EndPointMetrics - V5 Query Payload Tests', () => {
// Wait for skeletons to disappear
await waitFor(() => {
const skeletons = document.querySelectorAll('.ant-skeleton-button');
- expect(skeletons.length).toBe(0);
+ expect(skeletons).toHaveLength(0);
});
// Verify all metric labels are displayed
@@ -342,7 +342,7 @@ describe('EndPointMetrics - V5 Query Payload Tests', () => {
await waitFor(() => {
const skeletons = document.querySelectorAll('.ant-skeleton-button');
- expect(skeletons.length).toBe(0);
+ expect(skeletons).toHaveLength(0);
});
// When no data, all values should show "-"
diff --git a/frontend/src/container/ApiMonitoring/__tests__/APIMonitoringUtils.test.tsx b/frontend/src/container/ApiMonitoring/__tests__/APIMonitoringUtils.test.tsx
index 4d7efe53ba..1afe5e5e3d 100644
--- a/frontend/src/container/ApiMonitoring/__tests__/APIMonitoringUtils.test.tsx
+++ b/frontend/src/container/ApiMonitoring/__tests__/APIMonitoringUtils.test.tsx
@@ -303,7 +303,7 @@ describe('API Monitoring Utils', () => {
const result = extractPortAndEndpoint(url);
// Assert
- expect(result).toEqual({
+ expect(result).toStrictEqual({
port: '8080',
endpoint: '/api/endpoint?param=value',
});
@@ -317,7 +317,7 @@ describe('API Monitoring Utils', () => {
const result = extractPortAndEndpoint(url);
// Assert
- expect(result).toEqual({
+ expect(result).toStrictEqual({
port: '-',
endpoint: '/api/endpoint',
});
@@ -331,7 +331,7 @@ describe('API Monitoring Utils', () => {
const result = extractPortAndEndpoint(nonUrl);
// Assert
- expect(result).toEqual({
+ expect(result).toStrictEqual({
port: '-',
endpoint: nonUrl,
});
@@ -379,7 +379,7 @@ describe('API Monitoring Utils', () => {
const result = getFormattedEndPointDropDownData([]);
// Assert
- expect(result).toEqual([]);
+ expect(result).toStrictEqual([]);
});
it('should handle undefined input', () => {
@@ -392,7 +392,7 @@ describe('API Monitoring Utils', () => {
// Assert
// If the implementation doesn't handle undefined, just check that it returns something predictable
// Based on the error, it seems the function returns undefined for undefined input
- expect(result).toEqual([]);
+ expect(result).toStrictEqual([]);
});
it('should handle items without URL path', () => {
@@ -460,7 +460,7 @@ describe('API Monitoring Utils', () => {
// Assert
expect(result).toBeDefined();
- expect(result.length).toBe(2);
+ expect(result).toHaveLength(2);
// Check first item
expect(result[0].statusCode).toBe('200');
@@ -493,7 +493,7 @@ describe('API Monitoring Utils', () => {
// Assert
expect(result).toBeDefined();
- expect(result.length).toBe(1);
+ expect(result).toHaveLength(1);
expect(result[0].statusCode).toBe('-');
expect(result[0].count).toBe('-');
expect(result[0].p99Latency).toBe('-');
@@ -506,7 +506,7 @@ describe('API Monitoring Utils', () => {
// Assert
expect(result).toBeDefined();
- expect(result).toEqual([]);
+ expect(result).toStrictEqual([]);
});
it('should handle undefined input', () => {
@@ -518,7 +518,7 @@ describe('API Monitoring Utils', () => {
// Assert
expect(result).toBeDefined();
- expect(result).toEqual([]);
+ expect(result).toStrictEqual([]);
});
it('should handle mixed status code formats and preserve order', () => {
@@ -555,7 +555,7 @@ describe('API Monitoring Utils', () => {
// Assert
expect(result).toBeDefined();
- expect(result.length).toBe(3);
+ expect(result).toHaveLength(3);
// Check order preservation - should maintain the same order as input
expect(result[0].statusCode).toBe('404');
@@ -675,7 +675,7 @@ describe('API Monitoring Utils', () => {
// Assert
expect(result).toBeDefined();
- expect(result.data.result).toEqual([]);
+ expect(result.data.result).toStrictEqual([]);
});
it('should handle empty result array', () => {
@@ -695,7 +695,7 @@ describe('API Monitoring Utils', () => {
// Assert
expect(result).toBeDefined();
- expect(result.data.result).toEqual([]);
+ expect(result.data.result).toStrictEqual([]);
});
});
@@ -779,7 +779,7 @@ describe('API Monitoring Utils', () => {
// Assert
expect(result).toBeDefined();
- expect(result.length).toBe(2);
+ expect(result).toHaveLength(2);
// Should have two filters, one for >= start code and one for <= end code
const startRangeFilter = result.find((item) => item.op === '>=');
@@ -811,7 +811,7 @@ describe('API Monitoring Utils', () => {
// Assert
expect(result).toBeDefined();
- expect(result.length).toBe(2);
+ expect(result).toHaveLength(2);
const startRangeFilter = result.find((item) => item.op === '>=');
const endRangeFilter = result.find((item) => item.op === '<=');
@@ -832,7 +832,7 @@ describe('API Monitoring Utils', () => {
// Assert
expect(result).toBeDefined();
- expect(result).toEqual([]);
+ expect(result).toStrictEqual([]);
});
it('should handle empty metric object', () => {
@@ -841,7 +841,7 @@ describe('API Monitoring Utils', () => {
// Assert
expect(result).toBeDefined();
- expect(result).toEqual([]);
+ expect(result).toStrictEqual([]);
});
it('should handle metric without response_status_code', () => {
@@ -855,7 +855,7 @@ describe('API Monitoring Utils', () => {
// Assert
expect(result).toBeDefined();
- expect(result).toEqual([]);
+ expect(result).toStrictEqual([]);
});
it('should handle unsupported status code range', () => {
@@ -869,7 +869,7 @@ describe('API Monitoring Utils', () => {
// Assert
expect(result).toBeDefined();
- expect(result.length).toBe(2);
+ expect(result).toHaveLength(2);
// Should still have two filters
const startRangeFilter = result.find((item) => item.op === '>=');
diff --git a/frontend/src/container/ApiMonitoring/__tests__/AllEndpointsWidgetV5Migration.test.tsx b/frontend/src/container/ApiMonitoring/__tests__/AllEndpointsWidgetV5Migration.test.tsx
index 44991b94ca..7b75fc45d9 100644
--- a/frontend/src/container/ApiMonitoring/__tests__/AllEndpointsWidgetV5Migration.test.tsx
+++ b/frontend/src/container/ApiMonitoring/__tests__/AllEndpointsWidgetV5Migration.test.tsx
@@ -61,25 +61,29 @@ describe('AllEndpointsWidget - V5 Migration Validation', () => {
// Query A: count()
expect(queryA.aggregations).toBeDefined();
expect(Array.isArray(queryA.aggregations)).toBe(true);
- expect(queryA.aggregations).toEqual([{ expression: 'count()' }]);
+ expect(queryA.aggregations).toStrictEqual([{ expression: 'count()' }]);
expect(queryA).not.toHaveProperty('aggregateAttribute');
// Query B: p99(duration_nano)
expect(queryB.aggregations).toBeDefined();
expect(Array.isArray(queryB.aggregations)).toBe(true);
- expect(queryB.aggregations).toEqual([{ expression: 'p99(duration_nano)' }]);
+ expect(queryB.aggregations).toStrictEqual([
+ { expression: 'p99(duration_nano)' },
+ ]);
expect(queryB).not.toHaveProperty('aggregateAttribute');
// Query C: max(timestamp)
expect(queryC.aggregations).toBeDefined();
expect(Array.isArray(queryC.aggregations)).toBe(true);
- expect(queryC.aggregations).toEqual([{ expression: 'max(timestamp)' }]);
+ expect(queryC.aggregations).toStrictEqual([
+ { expression: 'max(timestamp)' },
+ ]);
expect(queryC).not.toHaveProperty('aggregateAttribute');
// Query D: count() (disabled, for errors)
expect(queryD.aggregations).toBeDefined();
expect(Array.isArray(queryD.aggregations)).toBe(true);
- expect(queryD.aggregations).toEqual([{ expression: 'count()' }]);
+ expect(queryD.aggregations).toStrictEqual([{ expression: 'count()' }]);
expect(queryD).not.toHaveProperty('aggregateAttribute');
});
diff --git a/frontend/src/container/ApiMonitoring/__tests__/EndpointDropdownV5Migration.test.tsx b/frontend/src/container/ApiMonitoring/__tests__/EndpointDropdownV5Migration.test.tsx
index f37026dfd6..4d4f122fb7 100644
--- a/frontend/src/container/ApiMonitoring/__tests__/EndpointDropdownV5Migration.test.tsx
+++ b/frontend/src/container/ApiMonitoring/__tests__/EndpointDropdownV5Migration.test.tsx
@@ -60,7 +60,7 @@ describe('EndpointDropdown - V5 Migration Validation', () => {
// V5 Aggregation format: aggregations array (not aggregateAttribute)
expect(queryA.aggregations).toBeDefined();
expect(Array.isArray(queryA.aggregations)).toBe(true);
- expect(queryA.aggregations?.[0]).toEqual({
+ expect(queryA.aggregations?.[0]).toStrictEqual({
expression: 'count()',
});
expect(queryA).not.toHaveProperty('aggregateAttribute');
diff --git a/frontend/src/container/ApiMonitoring/__tests__/queryParams.test.tsx b/frontend/src/container/ApiMonitoring/__tests__/queryParams.test.tsx
index f5a6eb31a7..39ebf0e379 100644
--- a/frontend/src/container/ApiMonitoring/__tests__/queryParams.test.tsx
+++ b/frontend/src/container/ApiMonitoring/__tests__/queryParams.test.tsx
@@ -19,7 +19,7 @@ describe('API Monitoring Query Params', () => {
describe('getApiMonitoringParams', () => {
it('returns default params when no query param exists', () => {
const search = '';
- expect(getApiMonitoringParams(search)).toEqual(DEFAULT_PARAMS);
+ expect(getApiMonitoringParams(search)).toStrictEqual(DEFAULT_PARAMS);
});
it('parses URL query params correctly', () => {
@@ -52,7 +52,7 @@ describe('API Monitoring Query Params', () => {
urlParams.set('apiMonitoringParams', 'invalid-json');
const search = `?${urlParams.toString()}`;
- expect(getApiMonitoringParams(search)).toEqual(DEFAULT_PARAMS);
+ expect(getApiMonitoringParams(search)).toStrictEqual(DEFAULT_PARAMS);
});
});
diff --git a/frontend/src/container/BillingContainer/BillingContainer.test.tsx b/frontend/src/container/BillingContainer/BillingContainer.test.tsx
index 5152c9b855..0ebbd49398 100644
--- a/frontend/src/container/BillingContainer/BillingContainer.test.tsx
+++ b/frontend/src/container/BillingContainer/BillingContainer.test.tsx
@@ -20,7 +20,7 @@ window.ResizeObserver =
describe('BillingContainer', () => {
jest.setTimeout(30000);
- test('Component should render', async () => {
+ it('Component should render', async () => {
render(<BillingContainer />);
const dataInjection = screen.getByRole('columnheader', {
@@ -61,7 +61,7 @@ describe('BillingContainer', () => {
jest.useRealTimers();
});
- test('OnTrail', async () => {
+ it('OnTrail', async () => {
// Pin "now" so trial end (20 Oct 2023) is tomorrow => "1 days_remaining"
render(
@@ -73,17 +73,19 @@ describe('BillingContainer', () => {
// If the component schedules any setTimeout on mount, flush them:
jest.runOnlyPendingTimers();
- expect(await screen.findByText('Free Trial')).toBeInTheDocument();
- expect(await screen.findByText('billing')).toBeInTheDocument();
- expect(await screen.findByText(/\$0/i)).toBeInTheDocument();
+ await expect(screen.findByText('Free Trial')).resolves.toBeInTheDocument();
+ await expect(screen.findByText('billing')).resolves.toBeInTheDocument();
+ await expect(screen.findByText(/\$0/i)).resolves.toBeInTheDocument();
- expect(
- await screen.findByText(
+ await expect(
+ screen.findByText(
/You are in free trial period. Your free trial will end on 20 Oct 2023/i,
),
- ).toBeInTheDocument();
+ ).resolves.toBeInTheDocument();
- expect(await screen.findByText(/1 days_remaining/i)).toBeInTheDocument();
+ await expect(
+ screen.findByText(/1 days_remaining/i),
+ ).resolves.toBeInTheDocument();
const upgradeButtons = await screen.findAllByRole('button', {
name: /upgrade_plan/i,
@@ -91,13 +93,15 @@ describe('BillingContainer', () => {
expect(upgradeButtons).toHaveLength(2);
expect(upgradeButtons[1]).toBeInTheDocument();
- expect(await screen.findByText(/checkout_plans/i)).toBeInTheDocument();
- expect(
- await screen.findByRole('link', { name: /here/i }),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText(/checkout_plans/i),
+ ).resolves.toBeInTheDocument();
+ await expect(
+ screen.findByRole('link', { name: /here/i }),
+ ).resolves.toBeInTheDocument();
});
- test('OnTrail but trialConvertedToSubscription', async () => {
+ it('OnTrail but trialConvertedToSubscription', async () => {
await act(async () => {
render(
<BillingContainer />,
@@ -137,7 +141,7 @@ describe('BillingContainer', () => {
});
});
- test('Not on ontrail', async () => {
+ it('Not on ontrail', async () => {
const { findByText } = render(
<BillingContainer />,
{},
diff --git a/frontend/src/container/CreateAlertV2/EvaluationSettings/__tests__/utils.test.ts b/frontend/src/container/CreateAlertV2/EvaluationSettings/__tests__/utils.test.ts
index 5e03899552..183d1e3ef3 100644
--- a/frontend/src/container/CreateAlertV2/EvaluationSettings/__tests__/utils.test.ts
+++ b/frontend/src/container/CreateAlertV2/EvaluationSettings/__tests__/utils.test.ts
@@ -242,7 +242,7 @@ describe('utils', () => {
);
expect(rrulestr).toHaveBeenCalledWith(FREQ_DAILY);
- expect(result).toEqual([
+ expect(result).toStrictEqual([
new Date(MOCK_DATE_STRING),
new Date('2024-01-16T10:30:00Z'),
new Date('2024-01-17T10:30:00Z'),
@@ -300,7 +300,7 @@ describe('utils', () => {
expect(result).toBeDefined();
expect(Array.isArray(result)).toBe(true);
- expect(result?.map((res) => formatDate(res))).toEqual([
+ expect(result?.map((res) => formatDate(res))).toStrictEqual([
'15-01-2024 10:30:00',
'01-02-2024 10:30:00',
'15-02-2024 10:30:00',
@@ -319,7 +319,7 @@ describe('utils', () => {
expect(result).toBeDefined();
expect(Array.isArray(result)).toBe(true);
- expect(result?.map((res) => formatDate(res))).toEqual([
+ expect(result?.map((res) => formatDate(res))).toStrictEqual([
'15-01-2024 12:30:00',
'19-01-2024 12:30:00',
'22-01-2024 12:30:00',
@@ -339,7 +339,7 @@ describe('utils', () => {
expect(result).toBeDefined();
expect(Array.isArray(result)).toBe(true);
// today included (15-01-2024 00:30:00)
- expect(result?.map((res) => formatDate(res))).toEqual([
+ expect(result?.map((res) => formatDate(res))).toStrictEqual([
'15-01-2024 10:30:00',
'19-01-2024 10:30:00',
'22-01-2024 10:30:00',
@@ -359,7 +359,7 @@ describe('utils', () => {
expect(result).toBeDefined();
expect(Array.isArray(result)).toBe(true);
// today excluded (15-01-2024 00:30:00)
- expect(result?.map((res) => formatDate(res))).toEqual([
+ expect(result?.map((res) => formatDate(res))).toStrictEqual([
'19-01-2024 00:00:00',
'22-01-2024 00:00:00',
'26-01-2024 00:00:00',
@@ -379,7 +379,7 @@ describe('utils', () => {
expect(result).toBeDefined();
expect(Array.isArray(result)).toBe(true);
// today excluded (15-01-2024 00:30:00)
- expect(result?.map((res) => formatDate(res))).toEqual([
+ expect(result?.map((res) => formatDate(res))).toStrictEqual([
'19-01-2024 00:30:00',
'22-01-2024 00:30:00',
'26-01-2024 00:30:00',
@@ -398,7 +398,7 @@ describe('utils', () => {
expect(result).toBeDefined();
expect(Array.isArray(result)).toBe(true);
// today included (15-01-2024 10:30:00)
- expect(result?.map((res) => formatDate(res))).toEqual([
+ expect(result?.map((res) => formatDate(res))).toStrictEqual([
'15-01-2024 10:30:00',
'15-02-2024 10:30:00',
'15-03-2024 10:30:00',
@@ -417,7 +417,7 @@ describe('utils', () => {
expect(result).toBeDefined();
expect(Array.isArray(result)).toBe(true);
// today excluded (15-01-2024 10:30:00)
- expect(result?.map((res) => formatDate(res))).toEqual([
+ expect(result?.map((res) => formatDate(res))).toStrictEqual([
'15-02-2024 00:00:00',
'15-03-2024 00:00:00',
'15-04-2024 00:00:00',
@@ -436,7 +436,7 @@ describe('utils', () => {
expect(result).toBeDefined();
expect(Array.isArray(result)).toBe(true);
// today excluded (15-01-2024 10:30:00)
- expect(result?.map((res) => formatDate(res))).toEqual([
+ expect(result?.map((res) => formatDate(res))).toStrictEqual([
'15-02-2024 00:30:00',
'15-03-2024 00:30:00',
'15-04-2024 00:30:00',
@@ -455,7 +455,7 @@ describe('utils', () => {
expect(result).toBeDefined();
expect(Array.isArray(result)).toBe(true);
- expect(result?.map((res) => formatDate(res))).toEqual([
+ expect(result?.map((res) => formatDate(res))).toStrictEqual([
'29-01-2024 10:30:00',
'29-02-2024 10:30:00',
'29-03-2024 10:30:00',
@@ -474,7 +474,7 @@ describe('utils', () => {
expect(result).toBeDefined();
expect(Array.isArray(result)).toBe(true);
- expect(result?.map((res) => formatDate(res))).toEqual([
+ expect(result?.map((res) => formatDate(res))).toStrictEqual([
'31-01-2024 10:30:00',
'31-03-2024 10:30:00',
'31-05-2024 10:30:00',
@@ -511,7 +511,7 @@ describe('utils', () => {
5,
);
- expect(result?.map((res) => formatDate(res))).toEqual([
+ expect(result?.map((res) => formatDate(res))).toStrictEqual([
'29-01-2023 10:30:00',
'29-03-2023 10:30:00',
'29-04-2023 10:30:00',
@@ -529,7 +529,7 @@ describe('utils', () => {
);
expect(result).toBeDefined();
expect(Array.isArray(result)).toBe(true);
- expect(result?.map((res) => formatDate(res))).toEqual([
+ expect(result?.map((res) => formatDate(res))).toStrictEqual([
'15-01-2024 10:40:00',
'16-01-2024 10:40:00',
'17-01-2024 10:40:00',
@@ -547,7 +547,7 @@ describe('utils', () => {
);
expect(result).toBeDefined();
expect(Array.isArray(result)).toBe(true);
- expect(result?.map((res) => formatDate(res))).toEqual([
+ expect(result?.map((res) => formatDate(res))).toStrictEqual([
'16-01-2024 00:00:00',
'17-01-2024 00:00:00',
'18-01-2024 00:00:00',
@@ -565,7 +565,7 @@ describe('utils', () => {
);
expect(result).toBeDefined();
expect(Array.isArray(result)).toBe(true);
- expect(result?.map((res) => formatDate(res))).toEqual([
+ expect(result?.map((res) => formatDate(res))).toStrictEqual([
'16-01-2024 00:30:00',
'17-01-2024 00:30:00',
'18-01-2024 00:30:00',
@@ -583,7 +583,7 @@ describe('utils', () => {
);
expect(result).toBeDefined();
expect(Array.isArray(result)).toBe(true);
- expect(result?.map((res) => formatDate(res))).toEqual([
+ expect(result?.map((res) => formatDate(res))).toStrictEqual([
'15-01-2024 10:30:00',
'16-01-2024 10:30:00',
'17-01-2024 10:30:00',
@@ -621,7 +621,7 @@ describe('utils', () => {
);
expect(result).toBeDefined();
expect(Array.isArray(result)).toBe(true);
- expect(result?.map((res) => formatDate(res))).toEqual([
+ expect(result?.map((res) => formatDate(res))).toStrictEqual([
'31-01-2024 10:30:00',
'01-02-2024 10:30:00',
'02-02-2024 10:30:00',
diff --git a/frontend/src/container/CreateAlertV2/QuerySection/__tests__/QuerySection.test.tsx b/frontend/src/container/CreateAlertV2/QuerySection/__tests__/QuerySection.test.tsx
index 3a35ecc308..e87adf0e74 100644
--- a/frontend/src/container/CreateAlertV2/QuerySection/__tests__/QuerySection.test.tsx
+++ b/frontend/src/container/CreateAlertV2/QuerySection/__tests__/QuerySection.test.tsx
@@ -333,7 +333,7 @@ describe('QuerySection', () => {
const result = mockUseQueryBuilder.redirectWithQueryBuilderData.mock.calls[0];
- expect(result[0]).toEqual({
+ expect(result[0]).toStrictEqual({
id: MOCK_UUID,
queryType: EQueryType.QUERY_BUILDER,
unit: undefined,
@@ -351,7 +351,7 @@ describe('QuerySection', () => {
clickhouse_sql: [initialClickHouseData],
});
- expect(result[1]).toEqual({
+ expect(result[1]).toStrictEqual({
[QueryParams.alertType]: AlertTypes.METRICS_BASED_ALERT,
[QueryParams.ruleType]: AlertDetectionTypes.THRESHOLD_ALERT,
});
@@ -371,7 +371,7 @@ describe('QuerySection', () => {
const [queryArg] =
mockUseQueryBuilder.redirectWithQueryBuilderData.mock.calls[0];
- expect(queryArg).toEqual({
+ expect(queryArg).toStrictEqual({
...mockUseQueryBuilder.currentQuery,
queryType: EQueryType.PROM,
});
@@ -425,7 +425,7 @@ describe('QuerySection', () => {
const [queryArg] =
mockUseQueryBuilder.redirectWithQueryBuilderData.mock.calls[0];
- expect(queryArg).toEqual({
+ expect(queryArg).toStrictEqual({
...mockCurrentQueryWithPromQL,
queryType: EQueryType.QUERY_BUILDER,
});
@@ -479,7 +479,7 @@ describe('QuerySection', () => {
const [queryArg] =
mockUseQueryBuilder.redirectWithQueryBuilderData.mock.calls[0];
- expect(queryArg).toEqual({
+ expect(queryArg).toStrictEqual({
...mockCurrentQueryWithClickhouseSQL,
queryType: EQueryType.QUERY_BUILDER,
});
diff --git a/frontend/src/container/CreateAlertV2/context/__tests__/utils.test.tsx b/frontend/src/container/CreateAlertV2/context/__tests__/utils.test.tsx
index b41d918bac..75149cc1c6 100644
--- a/frontend/src/container/CreateAlertV2/context/__tests__/utils.test.tsx
+++ b/frontend/src/container/CreateAlertV2/context/__tests__/utils.test.tsx
@@ -54,7 +54,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_ALERT_NAME',
payload: 'Test Alert',
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_ALERT_STATE,
name: 'Test Alert',
});
@@ -66,7 +66,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_ALERT_LABELS',
payload: labels,
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_ALERT_STATE,
labels,
});
@@ -77,7 +77,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_Y_AXIS_UNIT',
payload: 'ms',
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_ALERT_STATE,
yAxisUnit: 'ms',
});
@@ -90,7 +90,7 @@ describe('CreateAlertV2 Context Utils', () => {
yAxisUnit: 'ms',
};
const result = alertCreationReducer(modifiedState, { type: 'RESET' });
- expect(result).toEqual(INITIAL_ALERT_STATE);
+ expect(result).toStrictEqual(INITIAL_ALERT_STATE);
});
it(TEST_SET_INITIAL_STATE_FROM_PAYLOAD, () => {
@@ -103,7 +103,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_INITIAL_STATE',
payload: newState,
});
- expect(result).toEqual(newState);
+ expect(result).toStrictEqual(newState);
});
it(TEST_RETURN_STATE_FOR_UNKNOWN_ACTION, () => {
@@ -112,7 +112,7 @@ describe('CreateAlertV2 Context Utils', () => {
{ type: UNKNOWN_ACTION_TYPE } as any,
);
- expect(result).toEqual(INITIAL_ALERT_STATE);
+ expect(result).toStrictEqual(INITIAL_ALERT_STATE);
});
});
@@ -211,7 +211,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_SELECTED_QUERY',
payload: 'B',
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_ALERT_THRESHOLD_STATE,
selectedQuery: 'B',
});
@@ -222,7 +222,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_OPERATOR',
payload: AlertThresholdOperator.IS_BELOW,
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_ALERT_THRESHOLD_STATE,
operator: AlertThresholdOperator.IS_BELOW,
});
@@ -233,7 +233,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_MATCH_TYPE',
payload: AlertThresholdMatchType.ALL_THE_TIME,
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_ALERT_THRESHOLD_STATE,
matchType: AlertThresholdMatchType.ALL_THE_TIME,
});
@@ -255,7 +255,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_THRESHOLDS',
payload: newThresholds,
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_ALERT_THRESHOLD_STATE,
thresholds: newThresholds,
});
@@ -272,7 +272,7 @@ describe('CreateAlertV2 Context Utils', () => {
thresholds: [],
};
const result = alertThresholdReducer(modifiedState, { type: 'RESET' });
- expect(result).toEqual(INITIAL_ALERT_THRESHOLD_STATE);
+ expect(result).toStrictEqual(INITIAL_ALERT_THRESHOLD_STATE);
});
it(TEST_SET_INITIAL_STATE_FROM_PAYLOAD, () => {
@@ -289,7 +289,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_INITIAL_STATE',
payload: newState,
});
- expect(result).toEqual(newState);
+ expect(result).toStrictEqual(newState);
});
it(TEST_RETURN_STATE_FOR_UNKNOWN_ACTION, () => {
@@ -298,7 +298,7 @@ describe('CreateAlertV2 Context Utils', () => {
{ type: UNKNOWN_ACTION_TYPE } as any,
);
- expect(result).toEqual(INITIAL_ALERT_THRESHOLD_STATE);
+ expect(result).toStrictEqual(INITIAL_ALERT_THRESHOLD_STATE);
});
});
@@ -308,7 +308,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_SEND_NOTIFICATION_IF_DATA_IS_MISSING',
payload: { toleranceLimit: 21, timeUnit: UniversalYAxisUnit.HOURS },
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_ADVANCED_OPTIONS_STATE,
sendNotificationIfDataIsMissing: {
...INITIAL_ADVANCED_OPTIONS_STATE.sendNotificationIfDataIsMissing,
@@ -323,7 +323,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'TOGGLE_SEND_NOTIFICATION_IF_DATA_IS_MISSING',
payload: true,
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_ADVANCED_OPTIONS_STATE,
sendNotificationIfDataIsMissing: {
...INITIAL_ADVANCED_OPTIONS_STATE.sendNotificationIfDataIsMissing,
@@ -337,7 +337,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_ENFORCE_MINIMUM_DATAPOINTS',
payload: { minimumDatapoints: 10 },
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_ADVANCED_OPTIONS_STATE,
enforceMinimumDatapoints: {
...INITIAL_ADVANCED_OPTIONS_STATE.enforceMinimumDatapoints,
@@ -351,7 +351,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'TOGGLE_ENFORCE_MINIMUM_DATAPOINTS',
payload: true,
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_ADVANCED_OPTIONS_STATE,
enforceMinimumDatapoints: {
...INITIAL_ADVANCED_OPTIONS_STATE.enforceMinimumDatapoints,
@@ -365,7 +365,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_DELAY_EVALUATION',
payload: { delay: 10, timeUnit: UniversalYAxisUnit.HOURS },
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_ADVANCED_OPTIONS_STATE,
delayEvaluation: { delay: 10, timeUnit: UniversalYAxisUnit.HOURS },
});
@@ -386,7 +386,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_EVALUATION_CADENCE',
payload: newCadence,
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_ADVANCED_OPTIONS_STATE,
evaluationCadence: {
...INITIAL_ADVANCED_OPTIONS_STATE.evaluationCadence,
@@ -400,7 +400,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_EVALUATION_CADENCE_MODE',
payload: 'custom',
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_ADVANCED_OPTIONS_STATE,
evaluationCadence: {
...INITIAL_ADVANCED_OPTIONS_STATE.evaluationCadence,
@@ -415,7 +415,7 @@ describe('CreateAlertV2 Context Utils', () => {
delayEvaluation: { delay: 10, timeUnit: UniversalYAxisUnit.HOURS },
};
const result = advancedOptionsReducer(modifiedState, { type: 'RESET' });
- expect(result).toEqual(INITIAL_ADVANCED_OPTIONS_STATE);
+ expect(result).toStrictEqual(INITIAL_ADVANCED_OPTIONS_STATE);
});
it(TEST_SET_INITIAL_STATE_FROM_PAYLOAD, () => {
@@ -431,7 +431,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_INITIAL_STATE',
payload: newState,
});
- expect(result).toEqual(newState);
+ expect(result).toStrictEqual(newState);
});
it(TEST_RETURN_STATE_FOR_UNKNOWN_ACTION, () => {
@@ -440,7 +440,7 @@ describe('CreateAlertV2 Context Utils', () => {
{ type: UNKNOWN_ACTION_TYPE } as any,
);
- expect(result).toEqual(INITIAL_ADVANCED_OPTIONS_STATE);
+ expect(result).toStrictEqual(INITIAL_ADVANCED_OPTIONS_STATE);
});
});
@@ -455,7 +455,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_WINDOW_TYPE',
payload: 'rolling',
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
windowType: 'rolling',
timeframe: INITIAL_EVALUATION_WINDOW_STATE.timeframe,
startingAt: INITIAL_EVALUATION_WINDOW_STATE.startingAt,
@@ -467,7 +467,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_WINDOW_TYPE',
payload: 'cumulative',
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
windowType: 'cumulative',
timeframe: 'currentHour',
startingAt: INITIAL_EVALUATION_WINDOW_STATE.startingAt,
@@ -479,7 +479,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_TIMEFRAME',
payload: '10m0s',
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_EVALUATION_WINDOW_STATE,
timeframe: '10m0s',
});
@@ -496,7 +496,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_STARTING_AT',
payload: newStartingAt,
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_EVALUATION_WINDOW_STATE,
startingAt: newStartingAt,
});
@@ -514,7 +514,7 @@ describe('CreateAlertV2 Context Utils', () => {
},
};
const result = evaluationWindowReducer(modifiedState, { type: 'RESET' });
- expect(result).toEqual(INITIAL_EVALUATION_WINDOW_STATE);
+ expect(result).toStrictEqual(INITIAL_EVALUATION_WINDOW_STATE);
});
it(TEST_SET_INITIAL_STATE_FROM_PAYLOAD, () => {
@@ -532,7 +532,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_INITIAL_STATE',
payload: newState,
});
- expect(result).toEqual(newState);
+ expect(result).toStrictEqual(newState);
});
it(TEST_RETURN_STATE_FOR_UNKNOWN_ACTION, () => {
@@ -541,7 +541,7 @@ describe('CreateAlertV2 Context Utils', () => {
{ type: UNKNOWN_ACTION_TYPE } as any,
);
- expect(result).toEqual(INITIAL_EVALUATION_WINDOW_STATE);
+ expect(result).toStrictEqual(INITIAL_EVALUATION_WINDOW_STATE);
});
});
@@ -555,7 +555,7 @@ describe('CreateAlertV2 Context Utils', () => {
payload: notifications,
},
);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_NOTIFICATION_SETTINGS_STATE,
multipleNotifications: notifications,
});
@@ -570,7 +570,7 @@ describe('CreateAlertV2 Context Utils', () => {
type: 'SET_MULTIPLE_NOTIFICATIONS',
payload: null,
});
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...modifiedState,
multipleNotifications: null,
});
@@ -590,7 +590,7 @@ describe('CreateAlertV2 Context Utils', () => {
payload: reNotification,
},
);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_NOTIFICATION_SETTINGS_STATE,
reNotification,
});
@@ -605,7 +605,7 @@ describe('CreateAlertV2 Context Utils', () => {
payload: description,
},
);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_NOTIFICATION_SETTINGS_STATE,
description,
});
@@ -619,7 +619,7 @@ describe('CreateAlertV2 Context Utils', () => {
payload: true,
},
);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
...INITIAL_NOTIFICATION_SETTINGS_STATE,
routingPolicies: true,
});
@@ -640,7 +640,7 @@ describe('CreateAlertV2 Context Utils', () => {
const result = notificationSettingsReducer(modifiedState, {
type: 'RESET',
});
- expect(result).toEqual(INITIAL_NOTIFICATION_SETTINGS_STATE);
+ expect(result).toStrictEqual(INITIAL_NOTIFICATION_SETTINGS_STATE);
});
it(TEST_SET_INITIAL_STATE_FROM_PAYLOAD, () => {
@@ -662,7 +662,7 @@ describe('CreateAlertV2 Context Utils', () => {
payload: newState,
},
);
- expect(result).toEqual(newState);
+ expect(result).toStrictEqual(newState);
});
it(TEST_RETURN_STATE_FOR_UNKNOWN_ACTION, () => {
@@ -671,7 +671,7 @@ describe('CreateAlertV2 Context Utils', () => {
{ type: UNKNOWN_ACTION_TYPE } as any,
);
- expect(result).toEqual(INITIAL_NOTIFICATION_SETTINGS_STATE);
+ expect(result).toStrictEqual(INITIAL_NOTIFICATION_SETTINGS_STATE);
});
});
});
diff --git a/frontend/src/container/CustomDomainSettings/__tests__/CustomDomainSettings.test.tsx b/frontend/src/container/CustomDomainSettings/__tests__/CustomDomainSettings.test.tsx
index 6808b589f9..c4e16fc8a0 100644
--- a/frontend/src/container/CustomDomainSettings/__tests__/CustomDomainSettings.test.tsx
+++ b/frontend/src/container/CustomDomainSettings/__tests__/CustomDomainSettings.test.tsx
@@ -113,7 +113,7 @@ describe('CustomDomainSettings', () => {
await user.click(screen.getByRole('button', { name: /apply changes/i }));
await waitFor(() => {
- expect(capturedBody).toEqual({ name: 'myteam' });
+ expect(capturedBody).toStrictEqual({ name: 'myteam' });
});
});
@@ -143,9 +143,9 @@ describe('CustomDomainSettings', () => {
await user.type(input, 'myteam');
await user.click(screen.getByRole('button', { name: /apply changes/i }));
- expect(
- await screen.findByRole('button', { name: /contact support/i }),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByRole('button', { name: /contact support/i }),
+ ).resolves.toBeInTheDocument();
});
it('shows validation error when subdomain is less than 3 characters', async () => {
@@ -255,7 +255,7 @@ describe('CustomDomainSettings', () => {
},
});
- expect(await screen.findByText('My Org Name')).toBeInTheDocument();
+ await expect(screen.findByText('My Org Name')).resolves.toBeInTheDocument();
});
it('falls back to customDomainSubdomain when org displayName is missing', async () => {
@@ -269,7 +269,7 @@ describe('CustomDomainSettings', () => {
appContextOverrides: { org: [] },
});
- expect(await screen.findByText('custom-host')).toBeInTheDocument();
+ await expect(screen.findByText('custom-host')).resolves.toBeInTheDocument();
});
it('falls back to activeHost.name when neither org name nor custom domain exists', async () => {
@@ -294,7 +294,9 @@ describe('CustomDomainSettings', () => {
});
// 'accepted-starfish' is the default host's name
- expect(await screen.findByText('accepted-starfish')).toBeInTheDocument();
+ await expect(
+ screen.findByText('accepted-starfish'),
+ ).resolves.toBeInTheDocument();
});
it('does not render the card name row if workspaceName is totally falsy', async () => {
diff --git a/frontend/src/container/DashboardContainer/DashboardSettings/DashboardVariableSettings/VariableItem/VariableItem.test.tsx b/frontend/src/container/DashboardContainer/DashboardSettings/DashboardVariableSettings/VariableItem/VariableItem.test.tsx
index a5efbc57c4..fd18c70a53 100644
--- a/frontend/src/container/DashboardContainer/DashboardSettings/DashboardVariableSettings/VariableItem/VariableItem.test.tsx
+++ b/frontend/src/container/DashboardContainer/DashboardSettings/DashboardVariableSettings/VariableItem/VariableItem.test.tsx
@@ -155,7 +155,7 @@ describe('VariableItem Component', () => {
jest.clearAllMocks();
});
- test('renders without crashing', () => {
+ it('renders without crashing', () => {
renderVariableItem();
expect(screen.getByText(TEXT.ALL_VARIABLES)).toBeInTheDocument();
@@ -165,7 +165,7 @@ describe('VariableItem Component', () => {
});
describe('Variable Name Validation', () => {
- test('shows error when variable name already exists', () => {
+ it('shows error when variable name already exists', () => {
// Set validateName to return false (name exists)
const mockValidateName = jest.fn().mockReturnValue(false);
@@ -181,7 +181,7 @@ describe('VariableItem Component', () => {
// We won't check for button disabled state as it might be inconsistent in tests
});
- test('allows save when current variable name is used', () => {
+ it('allows save when current variable name is used', () => {
// Mock validate to return false for all other names but true for own name
const mockValidateName = jest
.fn()
@@ -197,7 +197,7 @@ describe('VariableItem Component', () => {
expect(screen.queryByText(TEXT.VARIABLE_EXISTS)).not.toBeInTheDocument();
});
- test('shows error when variable name contains whitespace', () => {
+ it('shows error when variable name contains whitespace', () => {
renderVariableItem({ ...basicVariableData, name: '' });
// Enter a name with whitespace
@@ -212,7 +212,7 @@ describe('VariableItem Component', () => {
expect(saveButton).toBeDisabled();
});
- test('allows variable name without whitespace', () => {
+ it('allows variable name without whitespace', () => {
renderVariableItem({ ...basicVariableData, name: '' });
// Enter a valid name without whitespace
@@ -223,7 +223,7 @@ describe('VariableItem Component', () => {
expect(screen.queryByText(TEXT.VARIABLE_WHITESPACE)).not.toBeInTheDocument();
});
- test('validates whitespace in auto-generated name for dynamic variables', () => {
+ it('validates whitespace in auto-generated name for dynamic variables', () => {
// Create a dynamic variable with empty name
const dynamicVariable: IDashboardVariable = {
...basicVariableData,
@@ -241,7 +241,7 @@ describe('VariableItem Component', () => {
});
describe('Dynamic Variable Attribute Key Validation', () => {
- test('shows error when attribute key already exists', async () => {
+ it('shows error when attribute key already exists', async () => {
// Mock validateAttributeKey to return false (attribute key exists)
const mockValidateAttributeKey = jest.fn().mockReturnValue(false);
@@ -277,7 +277,7 @@ describe('VariableItem Component', () => {
expect(saveButton).toBeDisabled();
});
- test('allows saving when attribute key is unique', async () => {
+ it('allows saving when attribute key is unique', async () => {
// Mock validateAttributeKey to return true (attribute key is unique)
const mockValidateAttributeKey = jest.fn().mockReturnValue(true);
@@ -315,7 +315,7 @@ describe('VariableItem Component', () => {
expect(saveButton).not.toBeDisabled();
});
- test('allows same attribute key for current variable being edited', async () => {
+ it('allows same attribute key for current variable being edited', async () => {
// Mock validateAttributeKey to return true for same variable
const mockValidateAttributeKey = jest.fn().mockImplementation(
(attributeKey, currentVariableId) =>
@@ -348,7 +348,7 @@ describe('VariableItem Component', () => {
});
});
- test('does not validate attribute key for non-dynamic variables', async () => {
+ it('does not validate attribute key for non-dynamic variables', async () => {
// Mock validateAttributeKey to return false (would show error for dynamic)
const mockValidateAttributeKey = jest.fn().mockReturnValue(false);
@@ -377,7 +377,7 @@ describe('VariableItem Component', () => {
});
describe('Variable Type Switching', () => {
- test('switches to CUSTOM variable type correctly', () => {
+ it('switches to CUSTOM variable type correctly', () => {
renderVariableItem();
// Find the Query button
@@ -401,7 +401,7 @@ describe('VariableItem Component', () => {
expect(screen.getByText(TEXT.OPTIONS)).toBeInTheDocument();
});
- test('switches to TEXTBOX variable type correctly', () => {
+ it('switches to TEXTBOX variable type correctly', () => {
renderVariableItem();
// Find and click Textbox button
@@ -424,7 +424,7 @@ describe('VariableItem Component', () => {
});
describe('MultiSelect and ALL Option', () => {
- test('enables ALL option only when multiSelect is enabled', async () => {
+ it('enables ALL option only when multiSelect is enabled', async () => {
renderVariableItem();
// Initially, ALL option should not be visible
@@ -457,7 +457,7 @@ describe('VariableItem Component', () => {
});
});
- test('disables ALL option when multiSelect is disabled', async () => {
+ it('disables ALL option when multiSelect is disabled', async () => {
// Create variable with multiSelect and showALLOption both enabled
const variable: IDashboardVariable = {
...basicVariableData,
@@ -501,7 +501,7 @@ describe('VariableItem Component', () => {
});
describe('Cancel and Navigation', () => {
- test('calls onCancel when clicking All Variables button', () => {
+ it('calls onCancel when clicking All Variables button', () => {
renderVariableItem();
// Click All variables button
@@ -511,7 +511,7 @@ describe('VariableItem Component', () => {
expect(onCancel).toHaveBeenCalledTimes(1);
});
- test('calls onCancel when clicking Discard button', () => {
+ it('calls onCancel when clicking Discard button', () => {
renderVariableItem();
// Click Discard button
@@ -550,7 +550,7 @@ describe('VariableItem Component', () => {
};
// Test for cyclic dependency detection
- test('detects circular dependency and shows error message', async () => {
+ it('detects circular dependency and shows error message', async () => {
// Create variables with circular dependency
const variable1 = createVariable(
TEST_VAR_IDS.VAR1,
@@ -577,7 +577,7 @@ describe('VariableItem Component', () => {
});
// Test for saving with no circular dependency
- test('allows saving when no circular dependency exists', async () => {
+ it('allows saving when no circular dependency exists', async () => {
// Create variables without circular dependency
const variable1 = createVariable(
TEST_VAR_IDS.VAR1,
@@ -608,7 +608,7 @@ describe('VariableItem Component', () => {
});
// Test with multiple variable formats in query
- test('detects circular dependency with different variable formats', async () => {
+ it('detects circular dependency with different variable formats', async () => {
// Create variables with circular dependency using different formats
const variable1 = createVariable(
TEST_VAR_IDS.VAR1,
@@ -645,7 +645,7 @@ describe('VariableItem Component', () => {
});
describe('Textbox Variable Default Value Handling', () => {
- test('saves textbox variable with defaultValue and selectedValue set to textboxValue', async () => {
+ it('saves textbox variable with defaultValue and selectedValue set to textboxValue', async () => {
const user = userEvent.setup();
const textboxVariable: IDashboardVariable = {
id: TEST_VAR_IDS.VAR1,
@@ -676,7 +676,7 @@ describe('VariableItem Component', () => {
);
});
- test('saves textbox variable with empty values when textboxValue is empty', async () => {
+ it('saves textbox variable with empty values when textboxValue is empty', async () => {
const user = userEvent.setup();
const textboxVariable: IDashboardVariable = {
id: TEST_VAR_IDS.VAR1,
@@ -707,7 +707,7 @@ describe('VariableItem Component', () => {
);
});
- test('updates textbox defaultValue and selectedValue when user changes textboxValue input', async () => {
+ it('updates textbox defaultValue and selectedValue when user changes textboxValue input', async () => {
const user = userEvent.setup();
const textboxVariable: IDashboardVariable = {
id: TEST_VAR_IDS.VAR1,
@@ -745,7 +745,7 @@ describe('VariableItem Component', () => {
);
});
- test('non-textbox variables use variableDefaultValue instead of textboxValue', async () => {
+ it('non-textbox variables use variableDefaultValue instead of textboxValue', async () => {
const user = userEvent.setup();
const queryVariable: IDashboardVariable = {
id: TEST_VAR_IDS.VAR1,
@@ -780,7 +780,7 @@ describe('VariableItem Component', () => {
expect(savedVariable.defaultValue).not.toBe('should-not-be-used');
});
- test('switching to textbox type sets defaultValue and selectedValue correctly on save', async () => {
+ it('switching to textbox type sets defaultValue and selectedValue correctly on save', async () => {
const user = userEvent.setup();
// Start with a QUERY variable
const queryVariable: IDashboardVariable = {
diff --git a/frontend/src/container/DashboardContainer/DashboardSettings/DashboardVariableSettings/index.tsx b/frontend/src/container/DashboardContainer/DashboardSettings/DashboardVariableSettings/index.tsx
index 7c72dc3ba9..5830c5ae88 100644
--- a/frontend/src/container/DashboardContainer/DashboardSettings/DashboardVariableSettings/index.tsx
+++ b/frontend/src/container/DashboardContainer/DashboardSettings/DashboardVariableSettings/index.tsx
@@ -38,7 +38,7 @@ function TableRow({ children, ...props }: RowProps): JSX.Element {
transition,
isDragging,
} = useSortable({
- // @ts-ignore
+ // @ts-expect-error
id: props['data-row-key'],
});
@@ -148,7 +148,7 @@ function VariablesSettings({
});
if (name) {
- // @ts-ignore
+ // @ts-expect-error
variableNamesMap[name] = name;
}
@@ -391,7 +391,7 @@ function VariablesSettings({
const variableName = updatedVariables[index].name;
if (variableName) {
- // @ts-ignore
+ // @ts-expect-error
reArrangedVariables[variableName] = {
...updatedVariables[index],
order: index,
diff --git a/frontend/src/container/DashboardContainer/DashboardSettings/PublicDashboard/__tests__/PublicDashboard.test.tsx b/frontend/src/container/DashboardContainer/DashboardSettings/PublicDashboard/__tests__/PublicDashboard.test.tsx
index cd48d06981..6d89632cb3 100644
--- a/frontend/src/container/DashboardContainer/DashboardSettings/PublicDashboard/__tests__/PublicDashboard.test.tsx
+++ b/frontend/src/container/DashboardContainer/DashboardSettings/PublicDashboard/__tests__/PublicDashboard.test.tsx
@@ -109,11 +109,13 @@ describe('PublicDashboardSetting', () => {
).toBeInTheDocument();
});
- expect(
- await screen.findByRole('checkbox', { name: /enable time range/i }),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByRole('checkbox', { name: /enable time range/i }),
+ ).resolves.toBeInTheDocument();
- expect(await screen.findByText(/default time range/i)).toBeInTheDocument();
+ await expect(
+ screen.findByText(/default time range/i),
+ ).resolves.toBeInTheDocument();
expect(screen.getByText(/Last 30 minutes/i)).toBeInTheDocument();
@@ -123,9 +125,9 @@ describe('PublicDashboardSetting', () => {
).toBeInTheDocument();
});
- expect(
- await screen.findByRole('button', { name: /publish dashboard/i }),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByRole('button', { name: /publish dashboard/i }),
+ ).resolves.toBeInTheDocument();
});
});
@@ -149,9 +151,9 @@ describe('PublicDashboardSetting', () => {
).toBeInTheDocument();
});
- expect(
- await screen.findByRole('checkbox', { name: /enable time range/i }),
- ).toBeChecked();
+ await expect(
+ screen.findByRole('checkbox', { name: /enable time range/i }),
+ ).resolves.toBeChecked();
await waitFor(() => {
expect(screen.getByText(/default time range/i)).toBeInTheDocument();
@@ -163,13 +165,13 @@ describe('PublicDashboardSetting', () => {
expect(screen.getByText(/Public Dashboard URL/i)).toBeInTheDocument();
});
- expect(
- await screen.findByRole('button', { name: /update published dashboard/i }),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByRole('button', { name: /update published dashboard/i }),
+ ).resolves.toBeInTheDocument();
- expect(
- await screen.findByRole('button', { name: /unpublish dashboard/i }),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByRole('button', { name: /unpublish dashboard/i }),
+ ).resolves.toBeInTheDocument();
});
});
@@ -249,7 +251,7 @@ describe('PublicDashboardSetting', () => {
rest.post(publicDashboardURL, async (req, res, ctx) => {
const body = await req.json();
createApiCalled = true;
- expect(body).toEqual({
+ expect(body).toStrictEqual({
timeRangeEnabled: true,
defaultTimeRange: DEFAULT_TIME_RANGE,
});
@@ -318,7 +320,7 @@ describe('PublicDashboardSetting', () => {
await waitFor(() => {
expect(updateApiCalled).toBe(true);
- expect(capturedRequestBody).toEqual({
+ expect(capturedRequestBody).toStrictEqual({
timeRangeEnabled: true,
defaultTimeRange: DEFAULT_TIME_RANGE,
});
diff --git a/frontend/src/container/DashboardContainer/DashboardVariablesSelection/VariableItem.test.tsx b/frontend/src/container/DashboardContainer/DashboardVariablesSelection/VariableItem.test.tsx
index 3d6ac415df..633eae5b94 100644
--- a/frontend/src/container/DashboardContainer/DashboardVariablesSelection/VariableItem.test.tsx
+++ b/frontend/src/container/DashboardContainer/DashboardVariablesSelection/VariableItem.test.tsx
@@ -40,7 +40,7 @@ describe('VariableItem', () => {
useEffectSpy.mockRestore();
});
- test('renders component with default props', () => {
+ it('renders component with default props', () => {
render(
<MockQueryClientProvider>
<VariableItem
@@ -54,7 +54,7 @@ describe('VariableItem', () => {
expect(screen.getByText('$testVariable')).toBeInTheDocument();
});
- test('renders Input when the variable type is TEXTBOX', () => {
+ it('renders Input when the variable type is TEXTBOX', () => {
render(
<MockQueryClientProvider>
<VariableItem
@@ -69,7 +69,7 @@ describe('VariableItem', () => {
).toBeInTheDocument();
});
- test('calls onValueUpdate when Input value changes and blurs', async () => {
+ it('calls onValueUpdate when Input value changes and blurs', async () => {
render(
<MockQueryClientProvider>
<VariableItem
@@ -102,7 +102,7 @@ describe('VariableItem', () => {
});
});
- test('renders a Select element when variable type is CUSTOM', () => {
+ it('renders a Select element when variable type is CUSTOM', () => {
render(
<MockQueryClientProvider>
<VariableItem
@@ -117,7 +117,7 @@ describe('VariableItem', () => {
expect(screen.getByTestId('variable-select')).toBeInTheDocument();
});
- test('renders a Select element with all selected', async () => {
+ it('renders a Select element with all selected', async () => {
const customVariableData = {
...mockCustomVariableData,
allSelected: true,
@@ -138,7 +138,7 @@ describe('VariableItem', () => {
expect(screen.getByText('ALL')).toBeInTheDocument();
});
- test('calls useEffect when the component mounts', () => {
+ it('calls useEffect when the component mounts', () => {
render(
<MockQueryClientProvider>
<VariableItem
diff --git a/frontend/src/container/DashboardContainer/DashboardVariablesSelection/__test__/DashboardVariableSelection.test.tsx b/frontend/src/container/DashboardContainer/DashboardVariablesSelection/__test__/DashboardVariableSelection.test.tsx
index 20e69b079c..8995ccbf2b 100644
--- a/frontend/src/container/DashboardContainer/DashboardVariablesSelection/__test__/DashboardVariableSelection.test.tsx
+++ b/frontend/src/container/DashboardContainer/DashboardVariablesSelection/__test__/DashboardVariableSelection.test.tsx
@@ -272,7 +272,7 @@ describe('DashboardVariableSelection', () => {
);
});
- expect(callOrder).toEqual([
+ expect(callOrder).toStrictEqual([
'updateDashboardVariablesStore',
'enqueueDescendantsOfVariable',
]);
diff --git a/frontend/src/container/DashboardContainer/DashboardVariablesSelection/__test__/VariableItem.defaulting.behavior.test.tsx b/frontend/src/container/DashboardContainer/DashboardVariablesSelection/__test__/VariableItem.defaulting.behavior.test.tsx
index ba8c6ec062..9adb364279 100644
--- a/frontend/src/container/DashboardContainer/DashboardVariablesSelection/__test__/VariableItem.defaulting.behavior.test.tsx
+++ b/frontend/src/container/DashboardContainer/DashboardVariablesSelection/__test__/VariableItem.defaulting.behavior.test.tsx
@@ -32,7 +32,7 @@ describe('VariableItem Default Value Selection Behavior', () => {
});
describe('Single Select Variables', () => {
- test('should keep previous selection value', async () => {
+ it('should keep previous selection value', async () => {
const variable: IDashboardVariable = {
id: TEST_VARIABLE_ID,
name: TEST_VARIABLE_NAME,
@@ -51,10 +51,10 @@ describe('VariableItem Default Value Selection Behavior', () => {
expect(screen.getByTestId(VARIABLE_SELECT_TESTID)).toBeInTheDocument();
});
- expect(await screen.findByText('option1')).toBeInTheDocument();
+ await expect(screen.findByText('option1')).resolves.toBeInTheDocument();
});
- test('should auto-select first option when no previous and no default', async () => {
+ it('should auto-select first option when no previous and no default', async () => {
const variable: IDashboardVariable = {
id: TEST_VARIABLE_ID,
name: TEST_VARIABLE_NAME,
@@ -74,12 +74,12 @@ describe('VariableItem Default Value Selection Behavior', () => {
});
// With the new variable select strategy, the first option is auto-selected
- expect(await screen.findByText('option1')).toBeInTheDocument();
+ await expect(screen.findByText('option1')).resolves.toBeInTheDocument();
});
});
describe('Multi Select Variables with ALL enabled', () => {
- test('should show ALL when all options are selected', async () => {
+ it('should show ALL when all options are selected', async () => {
const variable: IDashboardVariable = {
id: TEST_VARIABLE_ID,
name: TEST_VARIABLE_NAME,
@@ -99,12 +99,12 @@ describe('VariableItem Default Value Selection Behavior', () => {
expect(screen.getByTestId(VARIABLE_SELECT_TESTID)).toBeInTheDocument();
});
- expect(await screen.findByText('ALL')).toBeInTheDocument();
+ await expect(screen.findByText('ALL')).resolves.toBeInTheDocument();
});
});
describe('Multi Select Variables with ALL disabled', () => {
- test('should show placeholder when no selection', async () => {
+ it('should show placeholder when no selection', async () => {
const variable: IDashboardVariable = {
id: TEST_VARIABLE_ID,
name: TEST_VARIABLE_NAME,
@@ -123,7 +123,7 @@ describe('VariableItem Default Value Selection Behavior', () => {
expect(screen.getByTestId(VARIABLE_SELECT_TESTID)).toBeInTheDocument();
});
- expect(await screen.findByText('Select value')).toBeInTheDocument();
+ await expect(screen.findByText('Select value')).resolves.toBeInTheDocument();
});
});
});
diff --git a/frontend/src/container/DashboardContainer/DashboardVariablesSelection/__test__/dashboardVariables.test.tsx b/frontend/src/container/DashboardContainer/DashboardVariablesSelection/__test__/dashboardVariables.test.tsx
index 904f6b0cc3..c84f362b14 100644
--- a/frontend/src/container/DashboardContainer/DashboardVariablesSelection/__test__/dashboardVariables.test.tsx
+++ b/frontend/src/container/DashboardContainer/DashboardVariablesSelection/__test__/dashboardVariables.test.tsx
@@ -47,7 +47,7 @@ describe('dashboardVariables - utilities and processors', () => {
},
];
- test.each(testCases)(
+ it.each(testCases)(
'should update variable node when $scenario',
({ nodeToUpdate, expected }) => {
const updatedVariables: string[] = [];
@@ -57,7 +57,7 @@ describe('dashboardVariables - utilities and processors', () => {
onUpdateVariableNode(nodeToUpdate, graph, topologicalOrder, callback);
- expect(updatedVariables).toEqual(expected);
+ expect(updatedVariables).toStrictEqual(expected);
},
);
@@ -66,7 +66,7 @@ describe('dashboardVariables - utilities and processors', () => {
onUpdateVariableNode('http_status_code', graph, [], (node) =>
updatedVariables.push(node),
);
- expect(updatedVariables).toEqual([]);
+ expect(updatedVariables).toStrictEqual([]);
});
});
@@ -87,11 +87,11 @@ describe('dashboardVariables - utilities and processors', () => {
environment: [],
};
- expect(buildParentDependencyGraph(graph)).toEqual(expected);
+ expect(buildParentDependencyGraph(graph)).toStrictEqual(expected);
});
it('should handle empty graph', () => {
- expect(buildParentDependencyGraph({})).toEqual({});
+ expect(buildParentDependencyGraph({})).toStrictEqual({});
});
});
@@ -142,13 +142,13 @@ describe('dashboardVariables - utilities and processors', () => {
},
};
- expect(buildDependencyGraph(graph)).toEqual(expected);
+ expect(buildDependencyGraph(graph)).toStrictEqual(expected);
});
it('should return empty transitiveDescendants for an empty graph', () => {
const result = buildDependencyGraph({});
- expect(result.transitiveDescendants).toEqual({});
- expect(result.order).toEqual([]);
+ expect(result.transitiveDescendants).toStrictEqual({});
+ expect(result.order).toStrictEqual([]);
expect(result.hasCycle).toBe(false);
});
@@ -159,7 +159,7 @@ describe('dashboardVariables - utilities and processors', () => {
c: [],
};
const result = buildDependencyGraph(linearGraph);
- expect(result.transitiveDescendants).toEqual({
+ expect(result.transitiveDescendants).toStrictEqual({
a: ['b', 'c'],
b: ['c'],
c: [],
@@ -174,13 +174,13 @@ describe('dashboardVariables - utilities and processors', () => {
d: [],
};
const result = buildDependencyGraph(diamondGraph);
- expect(result.transitiveDescendants.a).toEqual(
+ expect(result.transitiveDescendants.a).toStrictEqual(
expect.arrayContaining(['b', 'c', 'd']),
);
expect(result.transitiveDescendants.a).toHaveLength(3);
- expect(result.transitiveDescendants.b).toEqual(['d']);
- expect(result.transitiveDescendants.c).toEqual(['d']);
- expect(result.transitiveDescendants.d).toEqual([]);
+ expect(result.transitiveDescendants.b).toStrictEqual(['d']);
+ expect(result.transitiveDescendants.c).toStrictEqual(['d']);
+ expect(result.transitiveDescendants.d).toStrictEqual([]);
});
it('should handle disconnected components in transitiveDescendants', () => {
@@ -191,10 +191,10 @@ describe('dashboardVariables - utilities and processors', () => {
y: [],
};
const result = buildDependencyGraph(disconnectedGraph);
- expect(result.transitiveDescendants.a).toEqual(['b']);
- expect(result.transitiveDescendants.b).toEqual([]);
- expect(result.transitiveDescendants.x).toEqual(['y']);
- expect(result.transitiveDescendants.y).toEqual([]);
+ expect(result.transitiveDescendants.a).toStrictEqual(['b']);
+ expect(result.transitiveDescendants.b).toStrictEqual([]);
+ expect(result.transitiveDescendants.x).toStrictEqual(['y']);
+ expect(result.transitiveDescendants.y).toStrictEqual([]);
});
it('should return empty transitiveDescendants for all leaf nodes', () => {
@@ -204,7 +204,7 @@ describe('dashboardVariables - utilities and processors', () => {
c: [],
};
const result = buildDependencyGraph(leafOnlyGraph);
- expect(result.transitiveDescendants).toEqual({
+ expect(result.transitiveDescendants).toStrictEqual({
a: [],
b: [],
c: [],
@@ -225,11 +225,11 @@ describe('dashboardVariables - utilities and processors', () => {
environment: [],
};
- expect(buildDependencies(variables)).toEqual(expected);
+ expect(buildDependencies(variables)).toStrictEqual(expected);
});
it('should handle empty variables array', () => {
- expect(buildDependencies([])).toEqual({});
+ expect(buildDependencies([])).toStrictEqual({});
});
});
});
diff --git a/frontend/src/container/DashboardContainer/DashboardVariablesSelection/util.ts b/frontend/src/container/DashboardContainer/DashboardVariablesSelection/util.ts
index 695e0727c6..dbe7e5d213 100644
--- a/frontend/src/container/DashboardContainer/DashboardVariablesSelection/util.ts
+++ b/frontend/src/container/DashboardContainer/DashboardVariablesSelection/util.ts
@@ -36,7 +36,7 @@ export const convertVariablesToDbFormat = (
variblesArr.reduce((result, obj: IDashboardVariable) => {
const { id } = obj;
- // @ts-ignore
+ // @ts-expect-error
result[id] = obj;
return result;
}, {});
diff --git a/frontend/src/container/DashboardContainer/DashboardVariablesSelection/utils.test.ts b/frontend/src/container/DashboardContainer/DashboardVariablesSelection/utils.test.ts
index 9b82d3e23a..b2158f273d 100644
--- a/frontend/src/container/DashboardContainer/DashboardVariablesSelection/utils.test.ts
+++ b/frontend/src/container/DashboardContainer/DashboardVariablesSelection/utils.test.ts
@@ -81,7 +81,7 @@ describe('onUpdateVariableNode', () => {
onUpdateVariableNode('deployment', graph, topologicalOrder, callback);
- expect(visited).toEqual(['deployment', 'namespace', 'service', 'pod']);
+ expect(visited).toStrictEqual(['deployment', 'namespace', 'service', 'pod']);
});
it('should call callback starting from a middle node', () => {
@@ -92,7 +92,7 @@ describe('onUpdateVariableNode', () => {
onUpdateVariableNode('namespace', graph, topologicalOrder, callback);
- expect(visited).toEqual(['namespace', 'service', 'pod']);
+ expect(visited).toStrictEqual(['namespace', 'service', 'pod']);
});
it('should only call callback for the leaf node when updating leaf', () => {
@@ -103,7 +103,7 @@ describe('onUpdateVariableNode', () => {
onUpdateVariableNode('pod', graph, topologicalOrder, callback);
- expect(visited).toEqual(['pod']);
+ expect(visited).toStrictEqual(['pod']);
});
it('should handle CUSTOM variable not in topologicalOrder by updating its children', () => {
@@ -116,7 +116,7 @@ describe('onUpdateVariableNode', () => {
onUpdateVariableNode('customVar', graph, topologicalOrder, callback);
// Should process namespace and its descendants (service, pod)
- expect(visited).toEqual(['namespace', 'service', 'pod']);
+ expect(visited).toStrictEqual(['namespace', 'service', 'pod']);
});
it('should handle node not in graph gracefully', () => {
@@ -128,7 +128,7 @@ describe('onUpdateVariableNode', () => {
onUpdateVariableNode('unknownNode', graph, topologicalOrder, callback);
// Should not call callback for any node since unknownNode has no children
- expect(visited).toEqual([]);
+ expect(visited).toStrictEqual([]);
});
it('should handle empty graph', () => {
@@ -140,7 +140,7 @@ describe('onUpdateVariableNode', () => {
onUpdateVariableNode('deployment', {}, topologicalOrder, callback);
// deployment is in topologicalOrder, so callback is called for it
- expect(visited).toEqual(['deployment']);
+ expect(visited).toStrictEqual(['deployment']);
});
it('should handle empty topologicalOrder', () => {
@@ -151,7 +151,7 @@ describe('onUpdateVariableNode', () => {
onUpdateVariableNode('deployment', graph, [], callback);
- expect(visited).toEqual([]);
+ expect(visited).toStrictEqual([]);
});
it('should handle CUSTOM variable with multiple children', () => {
@@ -173,7 +173,7 @@ describe('onUpdateVariableNode', () => {
);
// Should process namespace, service, and pod (descendants)
- expect(visited).toEqual(['namespace', 'service', 'pod']);
+ expect(visited).toStrictEqual(['namespace', 'service', 'pod']);
});
});
@@ -200,11 +200,15 @@ function makeDynamicVar(
describe('mergeUniqueStrings', () => {
it('should merge two arrays and deduplicate', () => {
- expect(mergeUniqueStrings(['a', 'b'], ['b', 'c'])).toEqual(['a', 'b', 'c']);
+ expect(mergeUniqueStrings(['a', 'b'], ['b', 'c'])).toStrictEqual([
+ 'a',
+ 'b',
+ 'c',
+ ]);
});
it('should convert numbers and booleans to strings', () => {
- expect(mergeUniqueStrings([1, true, 'hello'], [2, false])).toEqual([
+ expect(mergeUniqueStrings([1, true, 'hello'], [2, false])).toStrictEqual([
'1',
'true',
'hello',
@@ -214,15 +218,15 @@ describe('mergeUniqueStrings', () => {
});
it('should deduplicate when number and its string form both appear', () => {
- expect(mergeUniqueStrings([42], ['42'])).toEqual(['42']);
+ expect(mergeUniqueStrings([42], ['42'])).toStrictEqual(['42']);
});
it('should handle a single array', () => {
- expect(mergeUniqueStrings(['x', 'y', 'x'])).toEqual(['x', 'y']);
+ expect(mergeUniqueStrings(['x', 'y', 'x'])).toStrictEqual(['x', 'y']);
});
it('should handle three or more arrays', () => {
- expect(mergeUniqueStrings(['a'], ['b'], ['c'], ['a', 'c'])).toEqual([
+ expect(mergeUniqueStrings(['a'], ['b'], ['c'], ['a', 'c'])).toStrictEqual([
'a',
'b',
'c',
@@ -230,15 +234,19 @@ describe('mergeUniqueStrings', () => {
});
it('should return empty array when no arrays are provided', () => {
- expect(mergeUniqueStrings()).toEqual([]);
+ expect(mergeUniqueStrings()).toStrictEqual([]);
});
it('should return empty array when all input arrays are empty', () => {
- expect(mergeUniqueStrings([], [], [])).toEqual([]);
+ expect(mergeUniqueStrings([], [], [])).toStrictEqual([]);
});
it('should preserve order of first occurrence', () => {
- expect(mergeUniqueStrings(['c', 'a'], ['b', 'a'])).toEqual(['c', 'a', 'b']);
+ expect(mergeUniqueStrings(['c', 'a'], ['b', 'a'])).toStrictEqual([
+ 'c',
+ 'a',
+ 'b',
+ ]);
});
});
diff --git a/frontend/src/container/DashboardContainer/__test__/PanelManagement.test.tsx b/frontend/src/container/DashboardContainer/__test__/PanelManagement.test.tsx
index 84d74b40f7..df04ca5c34 100644
--- a/frontend/src/container/DashboardContainer/__test__/PanelManagement.test.tsx
+++ b/frontend/src/container/DashboardContainer/__test__/PanelManagement.test.tsx
@@ -424,7 +424,7 @@ describe('Panel Management Tests', () => {
);
// Should return dashboard unchanged
- expect(updatedDashboard).toEqual(dashboard);
+ expect(updatedDashboard).toStrictEqual(dashboard);
});
it('should handle undefined dashboard gracefully', () => {
diff --git a/frontend/src/container/DashboardContainer/visualization/charts/utils/__tests__/stackUtils.test.ts b/frontend/src/container/DashboardContainer/visualization/charts/utils/__tests__/stackUtils.test.ts
index d9e049652a..5406afa9a3 100644
--- a/frontend/src/container/DashboardContainer/visualization/charts/utils/__tests__/stackUtils.test.ts
+++ b/frontend/src/container/DashboardContainer/visualization/charts/utils/__tests__/stackUtils.test.ts
@@ -13,7 +13,7 @@ describe('stackUtils', () => {
[4, 5, 6],
];
const { data: result } = stack(data, neverOmit);
- expect(result[0]).toEqual([100, 200, 300]);
+ expect(result[0]).toStrictEqual([100, 200, 300]);
});
it('stacks value series cumulatively (last = raw, first = total)', () => {
@@ -26,9 +26,9 @@ describe('stackUtils', () => {
];
const { data: result } = stack(data, neverOmit);
// result[1] = s1+s2+s3, result[2] = s2+s3, result[3] = s3
- expect(result[1]).toEqual([12, 15, 18]); // 1+4+7, 2+5+8, 3+6+9
- expect(result[2]).toEqual([11, 13, 15]); // 4+7, 5+8, 6+9
- expect(result[3]).toEqual([7, 8, 9]);
+ expect(result[1]).toStrictEqual([12, 15, 18]); // 1+4+7, 2+5+8, 3+6+9
+ expect(result[2]).toStrictEqual([11, 13, 15]); // 4+7, 5+8, 6+9
+ expect(result[3]).toStrictEqual([7, 8, 9]);
});
it('treats null values as 0 when stacking', () => {
@@ -38,8 +38,8 @@ describe('stackUtils', () => {
[null, 10],
];
const { data: result } = stack(data, neverOmit);
- expect(result[1]).toEqual([1, 10]); // total
- expect(result[2]).toEqual([0, 10]); // last series with null→0
+ expect(result[1]).toStrictEqual([1, 10]); // total
+ expect(result[2]).toStrictEqual([0, 10]); // last series with null→0
});
it('copies omitted series as-is without accumulating', () => {
@@ -53,9 +53,9 @@ describe('stackUtils', () => {
const omitSeries2 = (i: number): boolean => i === 2;
const { data: result } = stack(data, omitSeries2);
// series 3 raw: [1, 2]; series 2 omitted: [100, 200] as-is; series 1 stacked with s3: [11, 22]
- expect(result[1]).toEqual([11, 22]); // 10+1, 20+2
- expect(result[2]).toEqual([100, 200]); // copied, not stacked
- expect(result[3]).toEqual([1, 2]);
+ expect(result[1]).toStrictEqual([11, 22]); // 10+1, 20+2
+ expect(result[2]).toStrictEqual([100, 200]); // copied, not stacked
+ expect(result[3]).toStrictEqual([1, 2]);
});
it('returns bands between consecutive visible series when none omitted', () => {
@@ -66,7 +66,7 @@ describe('stackUtils', () => {
[5, 6],
];
const { bands } = stack(data, neverOmit);
- expect(bands).toEqual([{ series: [1, 2] }, { series: [2, 3] }]);
+ expect(bands).toStrictEqual([{ series: [1, 2] }, { series: [2, 3] }]);
});
it('returns bands only between visible series when some are omitted', () => {
@@ -74,7 +74,7 @@ describe('stackUtils', () => {
const data: AlignedData = [[0], [1], [2], [3], [4]];
const omitSeries2 = (i: number): boolean => i === 2;
const { bands } = stack(data, omitSeries2);
- expect(bands).toEqual([{ series: [1, 3] }, { series: [3, 4] }]);
+ expect(bands).toStrictEqual([{ series: [1, 3] }, { series: [3, 4] }]);
});
it('returns empty bands when only one value series', () => {
@@ -83,30 +83,30 @@ describe('stackUtils', () => {
[1, 2],
];
const { bands } = stack(data, neverOmit);
- expect(bands).toEqual([]);
+ expect(bands).toStrictEqual([]);
});
});
describe('getInitialStackedBands', () => {
it('returns one band between each consecutive pair for seriesCount 3', () => {
- expect(getInitialStackedBands(3)).toEqual([
+ expect(getInitialStackedBands(3)).toStrictEqual([
{ series: [1, 2] },
{ series: [2, 3] },
]);
});
it('returns empty array for seriesCount 0 or 1', () => {
- expect(getInitialStackedBands(0)).toEqual([]);
- expect(getInitialStackedBands(1)).toEqual([]);
+ expect(getInitialStackedBands(0)).toStrictEqual([]);
+ expect(getInitialStackedBands(1)).toStrictEqual([]);
});
it('returns single band for seriesCount 2', () => {
- expect(getInitialStackedBands(2)).toEqual([{ series: [1, 2] }]);
+ expect(getInitialStackedBands(2)).toStrictEqual([{ series: [1, 2] }]);
});
it('returns bands [1,2], [2,3], ..., [n-1, n] for seriesCount n', () => {
const bands = getInitialStackedBands(5);
- expect(bands).toEqual([
+ expect(bands).toStrictEqual([
{ series: [1, 2] },
{ series: [2, 3] },
{ series: [3, 4] },
diff --git a/frontend/src/container/DashboardContainer/visualization/hooks/__tests__/useBarChartStacking.test.ts b/frontend/src/container/DashboardContainer/visualization/hooks/__tests__/useBarChartStacking.test.ts
index 3ea51be4a3..024c468f2d 100644
--- a/frontend/src/container/DashboardContainer/visualization/hooks/__tests__/useBarChartStacking.test.ts
+++ b/frontend/src/container/DashboardContainer/visualization/hooks/__tests__/useBarChartStacking.test.ts
@@ -119,9 +119,9 @@ describe('useBarChartStacking', () => {
}),
);
// Still returns stacked data (computed in useMemo); no hooks registered
- expect(result.current[0]).toEqual([0, 1]);
- expect(result.current[1]).toEqual([5, 7]); // stacked
- expect(result.current[2]).toEqual([4, 5]);
+ expect(result.current[0]).toStrictEqual([0, 1]);
+ expect(result.current[1]).toStrictEqual([5, 7]); // stacked
+ expect(result.current[2]).toStrictEqual([4, 5]);
});
it('returns stacked data when isStackedBarChart is true and multiple value series', () => {
@@ -138,10 +138,10 @@ describe('useBarChartStacking', () => {
config: null,
}),
);
- expect(result.current[0]).toEqual([0, 1, 2]);
- expect(result.current[1]).toEqual([12, 15, 18]); // s1+s2+s3
- expect(result.current[2]).toEqual([11, 13, 15]); // s2+s3
- expect(result.current[3]).toEqual([7, 8, 9]);
+ expect(result.current[0]).toStrictEqual([0, 1, 2]);
+ expect(result.current[1]).toStrictEqual([12, 15, 18]); // s1+s2+s3
+ expect(result.current[2]).toStrictEqual([11, 13, 15]); // s2+s3
+ expect(result.current[3]).toStrictEqual([7, 8, 9]);
});
it('returns data as-is when only one value series (no stacking needed)', () => {
@@ -156,7 +156,7 @@ describe('useBarChartStacking', () => {
config: null,
}),
);
- expect(result.current).toEqual(data);
+ expect(result.current).toStrictEqual(data);
});
it('registers setData and setSeries hooks when isStackedBarChart and config provided', () => {
diff --git a/frontend/src/container/DashboardContainer/visualization/panels/TimeSeriesPanel/__tests__/utils.test.ts b/frontend/src/container/DashboardContainer/visualization/panels/TimeSeriesPanel/__tests__/utils.test.ts
index 4131c24d48..66ae5533f6 100644
--- a/frontend/src/container/DashboardContainer/visualization/panels/TimeSeriesPanel/__tests__/utils.test.ts
+++ b/frontend/src/container/DashboardContainer/visualization/panels/TimeSeriesPanel/__tests__/utils.test.ts
@@ -83,7 +83,7 @@ describe('TimeSeriesPanel utils', () => {
const data = prepareChartData(apiResponse);
expect(data).toHaveLength(1);
- expect(data[0]).toEqual([]);
+ expect(data[0]).toStrictEqual([]);
});
it('returns timestamps and one series of y values for single series', () => {
@@ -102,8 +102,8 @@ describe('TimeSeriesPanel utils', () => {
const data = prepareChartData(apiResponse);
expect(data).toHaveLength(2);
- expect(data[0]).toEqual([1000, 2000]);
- expect(data[1]).toEqual([10, 20]);
+ expect(data[0]).toStrictEqual([1000, 2000]);
+ expect(data[1]).toStrictEqual([10, 20]);
});
it('merges timestamps and fills missing values with null for multiple series', () => {
@@ -128,11 +128,11 @@ describe('TimeSeriesPanel utils', () => {
const data = prepareChartData(apiResponse);
- expect(data[0]).toEqual([1000, 2000, 3000]);
+ expect(data[0]).toStrictEqual([1000, 2000, 3000]);
// First series: 1, null, 3
- expect(data[1]).toEqual([1, null, 3]);
+ expect(data[1]).toStrictEqual([1, null, 3]);
// Second series: 10, 20, null
- expect(data[2]).toEqual([10, 20, null]);
+ expect(data[2]).toStrictEqual([10, 20, null]);
});
});
diff --git a/frontend/src/container/DashboardContainer/visualization/panels/utils/__tests__/legendVisibilityUtils.test.ts b/frontend/src/container/DashboardContainer/visualization/panels/utils/__tests__/legendVisibilityUtils.test.ts
index 2af056126a..9e209b4a21 100644
--- a/frontend/src/container/DashboardContainer/visualization/panels/utils/__tests__/legendVisibilityUtils.test.ts
+++ b/frontend/src/container/DashboardContainer/visualization/panels/utils/__tests__/legendVisibilityUtils.test.ts
@@ -62,7 +62,7 @@ describe('legendVisibilityUtils', () => {
const result = getStoredSeriesVisibility('widget-1');
expect(result).not.toBeNull();
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{ label: 'CPU', show: true },
{ label: 'Memory', show: false },
]);
@@ -85,7 +85,7 @@ describe('legendVisibilityUtils', () => {
const result = getStoredSeriesVisibility('widget-1');
expect(result).not.toBeNull();
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{ label: 'CPU', show: true },
{ label: 'CPU', show: false },
{ label: 'Memory', show: false },
@@ -128,7 +128,7 @@ describe('legendVisibilityUtils', () => {
const stored = getStoredSeriesVisibility('widget-1');
expect(stored).not.toBeNull();
- expect(stored).toEqual([
+ expect(stored).toStrictEqual([
{ label: 'CPU', show: true },
{ label: 'Memory', show: false },
]);
@@ -150,7 +150,7 @@ describe('legendVisibilityUtils', () => {
const stored = getStoredSeriesVisibility('widget-new');
expect(stored).not.toBeNull();
- expect(stored).toEqual([{ label: 'CPU', show: false }]);
+ expect(stored).toStrictEqual([{ label: 'CPU', show: false }]);
});
it('updates existing widget visibility when entry already exists', () => {
@@ -176,7 +176,7 @@ describe('legendVisibilityUtils', () => {
const stored = getStoredSeriesVisibility('widget-1');
expect(stored).not.toBeNull();
- expect(stored).toEqual([
+ expect(stored).toStrictEqual([
{ label: 'CPU', show: false },
{ label: 'Memory', show: true },
]);
@@ -202,7 +202,7 @@ describe('legendVisibilityUtils', () => {
const stored = getStoredSeriesVisibility('widget-1');
expect(stored).not.toBeNull();
- expect(stored).toEqual([
+ expect(stored).toStrictEqual([
{ label: 'x-axis', show: true },
{ label: 'CPU', show: false },
]);
@@ -232,10 +232,10 @@ describe('legendVisibilityUtils', () => {
{ label: 'B', show: true },
]);
- expect(getStoredSeriesVisibility('widget-a')).toEqual([
+ expect(getStoredSeriesVisibility('widget-a')).toStrictEqual([
{ label: 'A', show: true },
]);
- expect(getStoredSeriesVisibility('widget-b')).toEqual([
+ expect(getStoredSeriesVisibility('widget-b')).toStrictEqual([
{ label: 'B', show: true },
]);
});
@@ -252,7 +252,7 @@ describe('legendVisibilityUtils', () => {
);
const [_, value] = (localStorage.setItem as jest.Mock).mock.calls[0];
expect((): void => JSON.parse(value)).not.toThrow();
- expect(JSON.parse(value)).toEqual([
+ expect(JSON.parse(value)).toStrictEqual([
{ name: 'widget-1', dataIndex: [{ label: 'CPU', show: true }] },
]);
});
@@ -263,7 +263,7 @@ describe('legendVisibilityUtils', () => {
const raw = localStorage.getItem(storageKey);
expect(raw).not.toBeNull();
const parsed = JSON.parse(raw ?? '[]');
- expect(parsed).toEqual([{ name: 'widget-1', dataIndex: [] }]);
+ expect(parsed).toStrictEqual([{ name: 'widget-1', dataIndex: [] }]);
expect(getStoredSeriesVisibility('widget-1')).toBeNull();
});
});
diff --git a/frontend/src/container/ForgotPassword/__tests__/ForgotPassword.test.tsx b/frontend/src/container/ForgotPassword/__tests__/ForgotPassword.test.tsx
index d37827729a..ed25b1dd51 100644
--- a/frontend/src/container/ForgotPassword/__tests__/ForgotPassword.test.tsx
+++ b/frontend/src/container/ForgotPassword/__tests__/ForgotPassword.test.tsx
@@ -188,7 +188,9 @@ describe('ForgotPassword Component', () => {
const submitButton = screen.getByTestId('forgot-password-submit');
await user.click(submitButton);
- expect(await screen.findByText(/check your email/i)).toBeInTheDocument();
+ await expect(
+ screen.findByText(/check your email/i),
+ ).resolves.toBeInTheDocument();
expect(
screen.getByText(/we've sent a password reset link/i),
).toBeInTheDocument();
@@ -208,7 +210,9 @@ describe('ForgotPassword Component', () => {
const submitButton = screen.getByTestId('forgot-password-submit');
await user.click(submitButton);
- expect(await screen.findByTestId('back-to-login')).toBeInTheDocument();
+ await expect(
+ screen.findByTestId('back-to-login'),
+ ).resolves.toBeInTheDocument();
});
it('redirects to login when clicking back to login on success screen', async () => {
@@ -225,7 +229,9 @@ describe('ForgotPassword Component', () => {
const submitButton = screen.getByTestId('forgot-password-submit');
await user.click(submitButton);
- expect(await screen.findByTestId('back-to-login')).toBeInTheDocument();
+ await expect(
+ screen.findByTestId('back-to-login'),
+ ).resolves.toBeInTheDocument();
const backToLoginButton = screen.getByTestId('back-to-login');
await user.click(backToLoginButton);
@@ -250,7 +256,9 @@ describe('ForgotPassword Component', () => {
const submitButton = screen.getByTestId('forgot-password-submit');
await user.click(submitButton);
- expect(await screen.findByText(/user not found/i)).toBeInTheDocument();
+ await expect(
+ screen.findByText(/user not found/i),
+ ).resolves.toBeInTheDocument();
});
it('displays error message when API returns server error', async () => {
@@ -263,9 +271,9 @@ describe('ForgotPassword Component', () => {
const submitButton = screen.getByTestId('forgot-password-submit');
await user.click(submitButton);
- expect(
- await screen.findByText(/internal server error occurred/i),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText(/internal server error occurred/i),
+ ).resolves.toBeInTheDocument();
});
it('clears error message on new submission attempt', async () => {
@@ -295,7 +303,9 @@ describe('ForgotPassword Component', () => {
const submitButton = screen.getByTestId('forgot-password-submit');
await user.click(submitButton);
- expect(await screen.findByText(/user not found/i)).toBeInTheDocument();
+ await expect(
+ screen.findByText(/user not found/i),
+ ).resolves.toBeInTheDocument();
// Click submit again
await user.click(submitButton);
@@ -303,7 +313,9 @@ describe('ForgotPassword Component', () => {
await waitFor(() => {
expect(screen.queryByText(/user not found/i)).not.toBeInTheDocument();
});
- expect(await screen.findByText(/check your email/i)).toBeInTheDocument();
+ await expect(
+ screen.findByText(/check your email/i),
+ ).resolves.toBeInTheDocument();
});
});
@@ -336,7 +348,9 @@ describe('ForgotPassword Component', () => {
await user.click(submitButton);
// Button should show loading state
- expect(await screen.findByText(/sending\.\.\./i)).toBeInTheDocument();
+ await expect(
+ screen.findByText(/sending\.\.\./i),
+ ).resolves.toBeInTheDocument();
});
it('disables submit button during loading', async () => {
diff --git a/frontend/src/container/FormAlertRules/__tests__/usePrefillAlertConditions.test.ts b/frontend/src/container/FormAlertRules/__tests__/usePrefillAlertConditions.test.ts
index 6dbdcea6d9..073771074f 100644
--- a/frontend/src/container/FormAlertRules/__tests__/usePrefillAlertConditions.test.ts
+++ b/frontend/src/container/FormAlertRules/__tests__/usePrefillAlertConditions.test.ts
@@ -76,7 +76,7 @@ describe('usePrefillAlertConditions', () => {
builder: { queryData: [{ reduceTo: 'p90' }] },
} as any),
);
- expect(result.current.matchType).toBe(null);
+ expect(result.current.matchType).toBeNull();
});
it('returns the correct matchType for multiple queries with same time aggregation', () => {
@@ -112,7 +112,7 @@ describe('usePrefillAlertConditions', () => {
},
} as any),
);
- expect(result.current.matchType).toBe(null);
+ expect(result.current.matchType).toBeNull();
});
it('returns the correct op, target, targetUnit from the higher priority threshold for multiple thresholds', () => {
diff --git a/frontend/src/container/FormAlertRules/utils.test.ts b/frontend/src/container/FormAlertRules/utils.test.ts
index 49acf94bc1..a8b0ffb68e 100644
--- a/frontend/src/container/FormAlertRules/utils.test.ts
+++ b/frontend/src/container/FormAlertRules/utils.test.ts
@@ -5,10 +5,10 @@ import { getUpdatedStepInterval } from './utils';
describe('getUpdatedStepInterval', () => {
it('should return 60', () => {
const result = getUpdatedStepInterval('5m0s');
- expect(result).toEqual(60);
+ expect(result).toBe(60);
});
it('should return 60 for 10m0s', () => {
const result = getUpdatedStepInterval('10m0s');
- expect(result).toEqual(60);
+ expect(result).toBe(60);
});
});
diff --git a/frontend/src/container/GridTableComponent/__tests__/utils.test.tsx b/frontend/src/container/GridTableComponent/__tests__/utils.test.tsx
index ed3ba194d1..7f00572ec5 100644
--- a/frontend/src/container/GridTableComponent/__tests__/utils.test.tsx
+++ b/frontend/src/container/GridTableComponent/__tests__/utils.test.tsx
@@ -44,7 +44,7 @@ describe('Table Panel utils', () => {
expect(getQueryLegend(query, 'A')).toBe('p99');
// should return undefined when legend not present
- expect(getQueryLegend(query, 'B')).toBe(undefined);
+ expect(getQueryLegend(query, 'B')).toBeUndefined();
});
it('sorter function for table sorting', () => {
diff --git a/frontend/src/container/InfraMonitoringK8s/EntityDetailsUtils/EntityLogs/__tests__/EntityLogs.test.tsx b/frontend/src/container/InfraMonitoringK8s/EntityDetailsUtils/EntityLogs/__tests__/EntityLogs.test.tsx
index 9de0738862..15235dd771 100644
--- a/frontend/src/container/InfraMonitoringK8s/EntityDetailsUtils/EntityLogs/__tests__/EntityLogs.test.tsx
+++ b/frontend/src/container/InfraMonitoringK8s/EntityDetailsUtils/EntityLogs/__tests__/EntityLogs.test.tsx
@@ -108,7 +108,7 @@ describe('EntityLogs', () => {
});
await waitFor(() => {
- expect(capturedQueryRangePayloads.length).toBe(1);
+ expect(capturedQueryRangePayloads).toHaveLength(1);
});
await waitFor(async () => {
@@ -131,7 +131,7 @@ describe('EntityLogs', () => {
});
await waitFor(() => {
- expect(capturedQueryRangePayloads.length).toBe(2);
+ expect(capturedQueryRangePayloads).toHaveLength(2);
});
const firstPayload = capturedQueryRangePayloads[0];
diff --git a/frontend/src/container/Integrations/CloudIntegration/AmazonWebServices/__tests__/ServiceDetailsS3Sync.test.tsx b/frontend/src/container/Integrations/CloudIntegration/AmazonWebServices/__tests__/ServiceDetailsS3Sync.test.tsx
index c75b92c532..9b34c134b4 100644
--- a/frontend/src/container/Integrations/CloudIntegration/AmazonWebServices/__tests__/ServiceDetailsS3Sync.test.tsx
+++ b/frontend/src/container/Integrations/CloudIntegration/AmazonWebServices/__tests__/ServiceDetailsS3Sync.test.tsx
@@ -149,7 +149,7 @@ describe('ServiceDetails for S3 Sync service', () => {
expect(capturedPayload).not.toBeNull();
});
- expect(capturedPayload).toEqual({
+ expect(capturedPayload).toStrictEqual({
config: {
aws: {
logs: {
diff --git a/frontend/src/container/ListAlertRules/__test__/utils.test.ts b/frontend/src/container/ListAlertRules/__test__/utils.test.ts
index 65b94dd5b1..07a1e67bb0 100644
--- a/frontend/src/container/ListAlertRules/__test__/utils.test.ts
+++ b/frontend/src/container/ListAlertRules/__test__/utils.test.ts
@@ -68,12 +68,12 @@ describe('filterAlerts', () => {
it('should return all alerts when filter is empty', () => {
const result = filterAlerts(mockAlerts, '');
- expect(result).toEqual(mockAlerts);
+ expect(result).toStrictEqual(mockAlerts);
});
it('should return all alerts when filter is only whitespace', () => {
const result = filterAlerts(mockAlerts, ' ');
- expect(result).toEqual(mockAlerts);
+ expect(result).toStrictEqual(mockAlerts);
});
it('should filter alerts by alert name', () => {
diff --git a/frontend/src/container/LogDetailedView/ContextView/__tests__/ContextLogRenderer.test.tsx b/frontend/src/container/LogDetailedView/ContextView/__tests__/ContextLogRenderer.test.tsx
index 0d63c3d80c..8507eec491 100644
--- a/frontend/src/container/LogDetailedView/ContextView/__tests__/ContextLogRenderer.test.tsx
+++ b/frontend/src/container/LogDetailedView/ContextView/__tests__/ContextLogRenderer.test.tsx
@@ -251,20 +251,20 @@ describe('ContextLogRenderer', () => {
const afterQuery = (afterPayload.compositeQuery as any).queries[0].spec;
// Verify timestamps remain constant
- expect(afterStart).toEqual(initialPayload.start);
- expect(afterEnd).toEqual(initialPayload.end);
+ expect(afterStart).toStrictEqual(initialPayload.start);
+ expect(afterEnd).toStrictEqual(initialPayload.end);
// Verify offset changes
- expect(initialQuery.offset).toEqual(0);
- expect(afterQuery.offset).toEqual(10);
+ expect(initialQuery.offset).toBe(0);
+ expect(afterQuery.offset).toBe(10);
// Verify filter changes
expect(initialQuery.filter.expression).toContain(expectedOpChange.before);
expect(afterQuery.filter.expression).toContain(expectedOpChange.after);
// Verify query structure remains consistent
- expect(initialQuery.name).toEqual(afterQuery.name);
- expect(initialQuery.signal).toEqual(afterQuery.signal);
+ expect(initialQuery.name).toStrictEqual(afterQuery.name);
+ expect(initialQuery.signal).toStrictEqual(afterQuery.signal);
};
it('should keep the start and end timestamps constant on clicking load more (prev / next) pages', async () => {
diff --git a/frontend/src/container/LogDetailedView/util.test.ts b/frontend/src/container/LogDetailedView/util.test.ts
index f2131c253b..3a16e253a4 100644
--- a/frontend/src/container/LogDetailedView/util.test.ts
+++ b/frontend/src/container/LogDetailedView/util.test.ts
@@ -10,20 +10,20 @@ import {
describe('recursiveParseJSON', () => {
it('should return an empty object if the input is not valid JSON', () => {
const result = recursiveParseJSON('not valid JSON');
- expect(result).toEqual({});
+ expect(result).toStrictEqual({});
});
it('should return the parsed JSON object for valid JSON input', () => {
const jsonString = '{"name": "John", "age": 30}';
const result = recursiveParseJSON(jsonString);
- expect(result).toEqual({ name: 'John', age: 30 });
+ expect(result).toStrictEqual({ name: 'John', age: 30 });
});
it('should recursively parse nested JSON objects', () => {
const jsonString =
'{"name": "John", "age": 30, "address": {"street": "123 Main St", "city": "Anytown", "state": "CA"}}';
const result = recursiveParseJSON(jsonString);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
name: 'John',
age: 30,
address: {
@@ -37,19 +37,21 @@ describe('recursiveParseJSON', () => {
it('should recursively parse nested JSON arrays', () => {
const jsonString = '[1, 2, [3, 4], {"foo": "bar"}]';
const result = recursiveParseJSON(jsonString);
- expect(result).toEqual([1, 2, [3, 4], { foo: 'bar' }]);
+ expect(result).toStrictEqual([1, 2, [3, 4], { foo: 'bar' }]);
});
it('should recursively parse deeply nested JSON objects', () => {
const jsonString = '{"foo": {"bar": {"baz": {"qux": {"value": 42}}}}}';
const result = recursiveParseJSON(jsonString);
- expect(result).toEqual({ foo: { bar: { baz: { qux: { value: 42 } } } } });
+ expect(result).toStrictEqual({
+ foo: { bar: { baz: { qux: { value: 42 } } } },
+ });
});
it('should handle JSON input that contains escaped characters', () => {
const jsonString = '{"name": "John\\", \\"Doe", "age": 30}';
const result = recursiveParseJSON(jsonString);
- expect(result).toEqual({ name: 'John", "Doe', age: 30 });
+ expect(result).toStrictEqual({ name: 'John", "Doe', age: 30 });
});
});
@@ -72,14 +74,14 @@ describe('flattenObject in the objects recursively', () => {
f: 4,
};
- expect(flattenObject(nestedObj)).toEqual(expected);
+ expect(flattenObject(nestedObj)).toStrictEqual(expected);
});
it('should return an empty object when input is empty', () => {
const nestedObj = {};
const expected = {};
- expect(flattenObject(nestedObj)).toEqual(expected);
+ expect(flattenObject(nestedObj)).toStrictEqual(expected);
});
it('should handle non-nested objects correctly', () => {
@@ -94,7 +96,7 @@ describe('flattenObject in the objects recursively', () => {
c: 3,
};
- expect(flattenObject(nestedObj)).toEqual(expected);
+ expect(flattenObject(nestedObj)).toStrictEqual(expected);
});
it('should handle null and undefined correctly', () => {
@@ -107,7 +109,7 @@ describe('flattenObject in the objects recursively', () => {
b: undefined,
};
- expect(flattenObject(nestedObj)).toEqual(expected);
+ expect(flattenObject(nestedObj)).toStrictEqual(expected);
});
it('should handle arrays correctly', () => {
@@ -120,7 +122,7 @@ describe('flattenObject in the objects recursively', () => {
b: 2,
};
- expect(flattenObject(objWithArray)).toEqual(expected);
+ expect(flattenObject(objWithArray)).toStrictEqual(expected);
});
it('should handle nested objects in arrays correctly', () => {
@@ -133,7 +135,7 @@ describe('flattenObject in the objects recursively', () => {
d: 3,
};
- expect(flattenObject(objWithArray)).toEqual(expected);
+ expect(flattenObject(objWithArray)).toStrictEqual(expected);
});
it('should handle objects with arrays and nested objects correctly', () => {
@@ -150,7 +152,7 @@ describe('flattenObject in the objects recursively', () => {
e: 5,
};
- expect(flattenObject(complexObj)).toEqual(expected);
+ expect(flattenObject(complexObj)).toStrictEqual(expected);
});
});
diff --git a/frontend/src/container/LogDetailedView/utils.tsx b/frontend/src/container/LogDetailedView/utils.tsx
index c021257667..65d22f7bac 100644
--- a/frontend/src/container/LogDetailedView/utils.tsx
+++ b/frontend/src/container/LogDetailedView/utils.tsx
@@ -287,7 +287,7 @@ export const aggregateAttributesResourcesToString = (logData: ILog): string => {
outputJson.scope = outputJson.scope || {};
Object.assign(outputJson.scope, logData[key as keyof ILog]);
} else {
- // @ts-ignore
+ // @ts-expect-error
outputJson[key] = logData[key as keyof ILog];
}
});
diff --git a/frontend/src/container/LogExplorerQuerySection/LogExplorerQuerySection.test.tsx b/frontend/src/container/LogExplorerQuerySection/LogExplorerQuerySection.test.tsx
index abbe018434..181408bad1 100644
--- a/frontend/src/container/LogExplorerQuerySection/LogExplorerQuerySection.test.tsx
+++ b/frontend/src/container/LogExplorerQuerySection/LogExplorerQuerySection.test.tsx
@@ -256,7 +256,7 @@ describe('LogExplorerQuerySection', () => {
VIEWS_TO_TEST.forEach((view) => {
rerender(<LogExplorerQuerySection selectedView={view} />);
- expect(mockQueryBuilderContext.currentQuery).toEqual(initialQuery);
+ expect(mockQueryBuilderContext.currentQuery).toStrictEqual(initialQuery);
});
});
diff --git a/frontend/src/container/LogsExplorerContext/__tests__/useInitialQuery.test.ts b/frontend/src/container/LogsExplorerContext/__tests__/useInitialQuery.test.ts
index 15ad7eb1e4..50d05d6374 100644
--- a/frontend/src/container/LogsExplorerContext/__tests__/useInitialQuery.test.ts
+++ b/frontend/src/container/LogsExplorerContext/__tests__/useInitialQuery.test.ts
@@ -350,7 +350,7 @@ describe('useInitialQuery - Priority-Based Resource Filtering', () => {
const serviceItems = calledWith.items.filter(
(item: TagFilterItem) => item.key?.key === 'service.name',
);
- expect(serviceItems.length).toBe(1);
+ expect(serviceItems).toHaveLength(1);
// Verify no priority items (k8s, cloud, host, container) are included
const priorityItems = calledWith.items.filter(
diff --git a/frontend/src/container/LogsExplorerViews/tests/LogsExplorerPagination.test.tsx b/frontend/src/container/LogsExplorerViews/tests/LogsExplorerPagination.test.tsx
index 7b43027216..7f7974fc0a 100644
--- a/frontend/src/container/LogsExplorerViews/tests/LogsExplorerPagination.test.tsx
+++ b/frontend/src/container/LogsExplorerViews/tests/LogsExplorerPagination.test.tsx
@@ -255,7 +255,7 @@ describe.skip('LogsExplorerViews Pagination', () => {
expect(
screen.queryByText('pending_data_placeholder'),
).not.toBeInTheDocument();
- expect(capturedPayloads.length).toBe(1);
+ expect(capturedPayloads).toHaveLength(1);
});
// Verify the payload of the first call, expecting offset 0
@@ -285,7 +285,7 @@ describe.skip('LogsExplorerViews Pagination', () => {
// Verify the second page request was made
// Wait for the second API call to be captured after the scroll
await waitFor(() => {
- expect(capturedPayloads.length).toBe(2);
+ expect(capturedPayloads).toHaveLength(2);
});
// Store the time range from the first payload, which should be consistent in subsequent requests
@@ -324,7 +324,7 @@ describe.skip('LogsExplorerViews Pagination', () => {
// Verify the third page request was made
// Wait for the third API call to be captured
await waitFor(() => {
- expect(capturedPayloads.length).toBe(3);
+ expect(capturedPayloads).toHaveLength(3);
});
const thirdPayload = capturedPayloads[2];
// Verify the payload of the third call, expecting offset 200 and consistent time range
@@ -526,13 +526,13 @@ describe('Logs Explorer -> stage and run query', () => {
const secondPayload = capturedPayloads[capturedPayloads.length - 1];
// Verify that the timestamps have changed due to UpdateTimeInterval
- expect(secondPayload.start).not.toEqual(initialStart);
- expect(secondPayload.end).not.toEqual(initialEnd);
+ expect(secondPayload.start).not.toStrictEqual(initialStart);
+ expect(secondPayload.end).not.toStrictEqual(initialEnd);
// The timestamps should be different (the exact difference depends on the mock implementation)
// Note: The timestamps might go backwards if UpdateTimeInterval is not called properly
- expect(secondPayload.start).not.toEqual(initialStart);
- expect(secondPayload.end).not.toEqual(initialEnd);
+ expect(secondPayload.start).not.toStrictEqual(initialStart);
+ expect(secondPayload.end).not.toStrictEqual(initialEnd);
// Verify that the IDs have changed (this confirms the Stage & Run Query button worked)
expect(currentStagedQuery.id).not.toBe(initialStagedQueryId);
diff --git a/frontend/src/container/LogsExplorerViews/tests/LogsExplorerViews.test.tsx b/frontend/src/container/LogsExplorerViews/tests/LogsExplorerViews.test.tsx
index 637c0b9a3f..90ad3dfb63 100644
--- a/frontend/src/container/LogsExplorerViews/tests/LogsExplorerViews.test.tsx
+++ b/frontend/src/container/LogsExplorerViews/tests/LogsExplorerViews.test.tsx
@@ -183,7 +183,7 @@ describe('LogsExplorerViews -', () => {
// Test that the menu items are present
const expectedMenuItemsCount = 3;
const menuItems = document.querySelectorAll('.menu-items .item');
- expect(menuItems.length).toBe(expectedMenuItemsCount);
+ expect(menuItems).toHaveLength(expectedMenuItemsCount);
// Test that the component renders without crashing
expect(queryByTestId(periscopeDownloadButtonTestId)).toBeInTheDocument();
@@ -429,7 +429,7 @@ describe('LogsExplorerViews -', () => {
expect(first.groupBy?.length ?? 0).toBe(0);
expect(first.having?.expression).toBe('');
// Default orderBy should be timestamp desc, then id desc
- expect(first.orderBy).toEqual([
+ expect(first.orderBy).toStrictEqual([
{ columnName: 'timestamp', order: 'desc' },
{ columnName: 'id', order: 'desc' },
]);
diff --git a/frontend/src/container/MembersSettings/__tests__/MembersSettings.integration.test.tsx b/frontend/src/container/MembersSettings/__tests__/MembersSettings.integration.test.tsx
index e0afcf169b..a3eb913d21 100644
--- a/frontend/src/container/MembersSettings/__tests__/MembersSettings.integration.test.tsx
+++ b/frontend/src/container/MembersSettings/__tests__/MembersSettings.integration.test.tsx
@@ -135,8 +135,8 @@ describe('MembersSettings (integration)', () => {
await user.click(screen.getByRole('button', { name: /invite member/i }));
- expect(await screen.findAllByPlaceholderText('[email protected]')).toHaveLength(
- 3,
- );
+ await expect(
+ screen.findAllByPlaceholderText('[email protected]'),
+ ).resolves.toHaveLength(3);
});
});
diff --git a/frontend/src/container/MetricsApplication/__tests__/TopOperationsTable.test.tsx b/frontend/src/container/MetricsApplication/__tests__/TopOperationsTable.test.tsx
index 32343ed9f6..74a0d90755 100644
--- a/frontend/src/container/MetricsApplication/__tests__/TopOperationsTable.test.tsx
+++ b/frontend/src/container/MetricsApplication/__tests__/TopOperationsTable.test.tsx
@@ -164,7 +164,7 @@ describe('TopOperation API Integration', () => {
// Verify that only the top_operations endpoint was called
expect(apiCalls).toHaveLength(1);
expect(apiCalls[0].endpoint).toBe(TOP_OPERATIONS_ENDPOINT);
- expect(apiCalls[0].body).toEqual({
+ expect(apiCalls[0].body).toStrictEqual({
start: `${defaultApiCallExpectation.start}`,
end: `${defaultApiCallExpectation.end}`,
service: defaultApiCallExpectation.service,
@@ -198,7 +198,7 @@ describe('TopOperation API Integration', () => {
// Verify that the entry_point_operations endpoint was called
expect(apiCalls).toHaveLength(1);
expect(apiCalls[0].endpoint).toBe(ENTRY_POINT_OPERATIONS_ENDPOINT);
- expect(apiCalls[0].body).toEqual({
+ expect(apiCalls[0].body).toStrictEqual({
start: `${defaultApiCallExpectation.start}`,
end: `${defaultApiCallExpectation.end}`,
service: defaultApiCallExpectation.service,
diff --git a/frontend/src/container/MetricsApplication/utils.test.ts b/frontend/src/container/MetricsApplication/utils.test.ts
index 7ad338d850..b25b397336 100644
--- a/frontend/src/container/MetricsApplication/utils.test.ts
+++ b/frontend/src/container/MetricsApplication/utils.test.ts
@@ -7,7 +7,7 @@ import {
} from './utils';
describe('Error Rate', () => {
- test('should return correct error rate', () => {
+ it('should return correct error rate', () => {
const list: TopOperationList = getTopOperationList({
errorCount: 10,
numCalls: 100,
@@ -16,35 +16,35 @@ describe('Error Rate', () => {
expect(getErrorRate(list)).toBe(10);
});
- test('should handle no errors gracefully', () => {
+ it('should handle no errors gracefully', () => {
const list = getTopOperationList({ errorCount: 0, numCalls: 100 });
expect(getErrorRate(list)).toBe(0);
});
- test('should handle zero calls', () => {
+ it('should handle zero calls', () => {
const list = getTopOperationList({ errorCount: 0, numCalls: 0 });
expect(getErrorRate(list)).toBe(0);
});
});
describe('getNearestHighestBucketValue', () => {
- test('should return nearest higher bucket value', () => {
+ it('should return nearest higher bucket value', () => {
expect(getNearestHighestBucketValue(50, [10, 20, 30, 40, 60, 70])).toBe('60');
});
- test('should return +Inf for value higher than any bucket', () => {
+ it('should return +Inf for value higher than any bucket', () => {
expect(getNearestHighestBucketValue(80, [10, 20, 30, 40, 60, 70])).toBe(
'+Inf',
);
});
- test('should return the first bucket for value lower than all buckets', () => {
+ it('should return the first bucket for value lower than all buckets', () => {
expect(getNearestHighestBucketValue(5, [10, 20, 30, 40, 60, 70])).toBe('10');
});
});
describe('convertedTracesToDownloadData', () => {
- test('should convert trace data correctly', () => {
+ it('should convert trace data correctly', () => {
const data = [
{
name: 'op1',
@@ -56,7 +56,7 @@ describe('convertedTracesToDownloadData', () => {
},
];
- expect(convertedTracesToDownloadData(data)).toEqual([
+ expect(convertedTracesToDownloadData(data)).toStrictEqual([
{
Name: 'op1',
'P50 (in ms)': '50.00',
diff --git a/frontend/src/container/MetricsExplorer/Explorer/__tests__/TimeSeries.test.tsx b/frontend/src/container/MetricsExplorer/Explorer/__tests__/TimeSeries.test.tsx
index 294a189da7..5a1f59768f 100644
--- a/frontend/src/container/MetricsExplorer/Explorer/__tests__/TimeSeries.test.tsx
+++ b/frontend/src/container/MetricsExplorer/Explorer/__tests__/TimeSeries.test.tsx
@@ -130,7 +130,9 @@ describe('TimeSeries', () => {
const alertIcon = screen.getByRole('img', { name: 'no unit warning' });
await user.hover(alertIcon);
- expect(await screen.findByText('metric details')).toBeInTheDocument();
+ await expect(
+ screen.findByText('metric details'),
+ ).resolves.toBeInTheDocument();
});
it('shows save unit prompt with enabled button when metric has no unit and a unit is selected', async () => {
@@ -142,9 +144,9 @@ describe('TimeSeries', () => {
showYAxisUnitSelector: true,
});
- expect(
- await screen.findByText('Set the selected unit as the metric unit?'),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText('Set the selected unit as the metric unit?'),
+ ).resolves.toBeInTheDocument();
const yesButton = screen.getByRole('button', { name: 'Yes' });
expect(yesButton).toBeEnabled();
diff --git a/frontend/src/container/MetricsExplorer/Explorer/__tests__/utils.test.tsx b/frontend/src/container/MetricsExplorer/Explorer/__tests__/utils.test.tsx
index 31789d84af..9a46f41322 100644
--- a/frontend/src/container/MetricsExplorer/Explorer/__tests__/utils.test.tsx
+++ b/frontend/src/container/MetricsExplorer/Explorer/__tests__/utils.test.tsx
@@ -61,24 +61,24 @@ describe('splitQueryIntoOneChartPerQuery', () => {
expect(result).toHaveLength(4);
// Verify query 1 has the correct data
expect(result[0].builder.queryData).toHaveLength(1);
- expect(result[0].builder.queryData[0]).toEqual(MOCK_QUERY_DATA_1);
+ expect(result[0].builder.queryData[0]).toStrictEqual(MOCK_QUERY_DATA_1);
expect(result[0].builder.queryFormulas).toHaveLength(0);
expect(result[0].unit).toBeUndefined();
// Verify query 2 has the correct data
expect(result[1].builder.queryData).toHaveLength(1);
- expect(result[1].builder.queryData[0]).toEqual(MOCK_QUERY_DATA_2);
+ expect(result[1].builder.queryData[0]).toStrictEqual(MOCK_QUERY_DATA_2);
expect(result[1].builder.queryFormulas).toHaveLength(0);
expect(result[1].unit).toBe('unit2');
// Verify query 3 has the correct data
expect(result[2].builder.queryFormulas).toHaveLength(1);
- expect(result[2].builder.queryFormulas[0]).toEqual(MOCK_FORMULA_DATA);
+ expect(result[2].builder.queryFormulas[0]).toStrictEqual(MOCK_FORMULA_DATA);
expect(result[2].builder.queryData).toHaveLength(2); // 2 disabled queries
expect(result[2].builder.queryData[0].disabled).toBe(true);
expect(result[2].builder.queryData[1].disabled).toBe(true);
expect(result[2].unit).toBe('');
// Verify query 4 has the correct data
expect(result[3].builder.queryFormulas).toHaveLength(1);
- expect(result[3].builder.queryFormulas[0]).toEqual(MOCK_FORMULA_DATA);
+ expect(result[3].builder.queryFormulas[0]).toStrictEqual(MOCK_FORMULA_DATA);
expect(result[3].builder.queryData).toHaveLength(2); // 2 disabled queries
expect(result[3].builder.queryData[0].disabled).toBe(true);
expect(result[3].builder.queryData[1].disabled).toBe(true);
@@ -106,7 +106,7 @@ describe('useGetMetrics', () => {
const { result } = renderHook(() => useGetMetrics(['metric1']));
expect(result.current.metrics).toHaveLength(1);
expect(result.current.metrics[0]).toBeDefined();
- expect(result.current.metrics[0]).toEqual(MOCK_METRIC_METADATA);
+ expect(result.current.metrics[0]).toStrictEqual(MOCK_METRIC_METADATA);
expect(result.current.isLoading).toBe(false);
expect(result.current.isError).toBe(false);
});
@@ -131,7 +131,7 @@ describe('getMetricUnits', () => {
it('should return the same unit for units that are not known to the universal unit mapper', () => {
const result = getMetricUnits([MOCK_METRIC_METADATA]);
expect(result).toHaveLength(1);
- expect(result[0]).toEqual(MOCK_METRIC_METADATA.unit);
+ expect(result[0]).toStrictEqual(MOCK_METRIC_METADATA.unit);
});
it('should return universal unit for units that are known to the universal unit mapper', () => {
diff --git a/frontend/src/container/NewWidget/RightContainer/ContextLinks/__test__/ContextLinks.test.tsx b/frontend/src/container/NewWidget/RightContainer/ContextLinks/__test__/ContextLinks.test.tsx
index 6486b78373..981ad8ea17 100644
--- a/frontend/src/container/NewWidget/RightContainer/ContextLinks/__test__/ContextLinks.test.tsx
+++ b/frontend/src/container/NewWidget/RightContainer/ContextLinks/__test__/ContextLinks.test.tsx
@@ -157,7 +157,7 @@ describe('ContextLinks Component', () => {
// Test the function by calling it with the current state
const result = setContextLinksCall(MOCK_EMPTY_CONTEXT_LINKS);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
linksData: [
{
id: expect.any(String), // ID is generated dynamically
diff --git a/frontend/src/container/NewWidget/__test__/NewWidget.test.tsx b/frontend/src/container/NewWidget/__test__/NewWidget.test.tsx
index 25a908ddd9..d676078ac3 100644
--- a/frontend/src/container/NewWidget/__test__/NewWidget.test.tsx
+++ b/frontend/src/container/NewWidget/__test__/NewWidget.test.tsx
@@ -93,7 +93,7 @@ jest.mock('react-router-dom-v5-compat', () => ({
describe('placeWidgetAtBottom', () => {
it('should place widget at (0,0) when layout is empty', () => {
const result = placeWidgetAtBottom('widget1', []);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
i: 'widget1',
x: 0,
y: 0,
@@ -104,7 +104,7 @@ describe('placeWidgetAtBottom', () => {
it('should place widget at (0,0) with custom dimensions when layout is empty', () => {
const result = placeWidgetAtBottom('widget1', [], 4, 8);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
i: 'widget1',
x: 0,
y: 0,
@@ -116,7 +116,7 @@ describe('placeWidgetAtBottom', () => {
it('should place widget next to existing widget in last row if space available', () => {
const existingLayout = [{ i: 'widget1', x: 0, y: 0, w: 6, h: 6 }];
const result = placeWidgetAtBottom('widget2', existingLayout);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
i: 'widget2',
x: 6,
y: 0,
@@ -131,7 +131,7 @@ describe('placeWidgetAtBottom', () => {
{ i: 'widget2', x: 6, y: 0, w: 6, h: 6 },
];
const result = placeWidgetAtBottom('widget3', existingLayout);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
i: 'widget3',
x: 0,
y: 6,
@@ -147,7 +147,7 @@ describe('placeWidgetAtBottom', () => {
{ i: 'widget3', x: 0, y: 6, w: 6, h: 6 },
];
const result = placeWidgetAtBottom('widget4', existingLayout);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
i: 'widget4',
x: 6,
y: 6,
@@ -163,7 +163,7 @@ describe('placeWidgetAtBottom', () => {
];
const result = placeWidgetAtBottom('widget3', existingLayout);
// y = 2 here as later the react-grid-layout will add 2px to the y value while adjusting the layout
- expect(result).toEqual({
+ expect(result).toStrictEqual({
i: 'widget3',
x: 6,
y: 2,
@@ -176,7 +176,7 @@ describe('placeWidgetAtBottom', () => {
describe('placeWidgetBetweenRows', () => {
it('should return single widget layout when layout is empty', () => {
const result = placeWidgetBetweenRows('widget1', [], 'currentRow');
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{
i: 'widget1',
x: 0,
@@ -195,7 +195,7 @@ describe('placeWidgetBetweenRows', () => {
const result = placeWidgetBetweenRows('widget3', existingLayout, 'widget2');
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{ i: 'widget1', x: 0, y: 0, w: 6, h: 6 },
{ i: 'widget2', x: 6, y: 0, w: 6, h: 6 },
{ i: 'widget3', x: 0, y: 6, w: 6, h: 6 },
@@ -238,7 +238,7 @@ describe('placeWidgetBetweenRows', () => {
'widget3',
);
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{
h: 1,
i: "'widget1'",
@@ -292,7 +292,7 @@ describe('placeWidgetBetweenRows', () => {
3,
);
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{ i: 'widget1', x: 0, y: 0, w: 12, h: 4 },
{ i: 'widget2', x: 0, y: 4, w: 8, h: 3 },
]);
diff --git a/frontend/src/container/NewWidget/__test__/getUplotChartData.test.ts b/frontend/src/container/NewWidget/__test__/getUplotChartData.test.ts
index 26b4def446..5be043bcc3 100644
--- a/frontend/src/container/NewWidget/__test__/getUplotChartData.test.ts
+++ b/frontend/src/container/NewWidget/__test__/getUplotChartData.test.ts
@@ -12,7 +12,7 @@ describe('getUplotChartData', () => {
BarNonStackedChartData.fillSpans,
BarNonStackedChartData.stackedBarChart,
);
- expect(result).toEqual([
+ expect(result).toStrictEqual([
[1758713940, 1758715020],
[33.933, 31.767],
[20.0, 25.0],
@@ -29,10 +29,10 @@ describe('getUplotChartData', () => {
// First series: [33.933, 31.767] + [20.0, 25.0] = [53.933, 56.767]
// Second series: [20.0, 25.0] (unchanged)
expect(result).toHaveLength(3);
- expect(result[0]).toEqual([1758713940, 1758715020]);
+ expect(result[0]).toStrictEqual([1758713940, 1758715020]);
expect(result[1][0]).toBeCloseTo(53.933, 3);
expect(result[1][1]).toBeCloseTo(56.767, 3);
- expect(result[2]).toEqual([20.0, 25.0]);
+ expect(result[2]).toStrictEqual([20.0, 25.0]);
});
it('should return the correct chart data for time series chart', () => {
@@ -41,7 +41,7 @@ describe('getUplotChartData', () => {
TimeSeriesChartData.fillSpans,
TimeSeriesChartData.stackedBarChart,
);
- expect(result).toEqual([
+ expect(result).toStrictEqual([
[1758713940, 1758715020],
[33.933, 31.767],
[20.0, 25.0],
diff --git a/frontend/src/container/NewWidget/__test__/utils.test.ts b/frontend/src/container/NewWidget/__test__/utils.test.ts
index a6ef14d8b3..683d472572 100644
--- a/frontend/src/container/NewWidget/__test__/utils.test.ts
+++ b/frontend/src/container/NewWidget/__test__/utils.test.ts
@@ -38,7 +38,7 @@ const buildSupersetQuery = (extras?: Record<string, unknown>): Query => ({
});
describe('handleQueryChange', () => {
- test('sets list-specific fields when switching to LIST', () => {
+ it('sets list-specific fields when switching to LIST', () => {
const superset = buildSupersetQuery();
const output = handleQueryChange(
PANEL_TYPES.LIST as keyof PartialPanelTypes,
@@ -60,7 +60,7 @@ describe('handleQueryChange', () => {
expect(secondQuery.queryName).toBe('B');
});
- test('resets noop and pagination when leaving LIST', () => {
+ it('resets noop and pagination when leaving LIST', () => {
const superset = buildSupersetQuery({
aggregateOperator: 'noop',
offset: 5,
diff --git a/frontend/src/container/OnboardingContainer/Steps/MarkdownStep/MarkdownStep.tsx b/frontend/src/container/OnboardingContainer/Steps/MarkdownStep/MarkdownStep.tsx
index 7daf6923c3..04cc4d704d 100644
--- a/frontend/src/container/OnboardingContainer/Steps/MarkdownStep/MarkdownStep.tsx
+++ b/frontend/src/container/OnboardingContainer/Steps/MarkdownStep/MarkdownStep.tsx
@@ -86,9 +86,9 @@ export default function MarkdownStep(): JSX.Element {
} else if (selectedModule?.id === ModulesMap.AzureMonitoring) {
docFilePaths = AzureMonitoringDocFilePaths;
}
- // @ts-ignore
+ // @ts-expect-error
if (docFilePaths && docFilePaths[path]) {
- // @ts-ignore
+ // @ts-expect-error
setMarkdownContent(docFilePaths[path]);
}
diff --git a/frontend/src/container/OnboardingContainer/utils/dataSourceUtils.ts b/frontend/src/container/OnboardingContainer/utils/dataSourceUtils.ts
index 0bca68bf26..5b18090418 100644
--- a/frontend/src/container/OnboardingContainer/utils/dataSourceUtils.ts
+++ b/frontend/src/container/OnboardingContainer/utils/dataSourceUtils.ts
@@ -391,7 +391,7 @@ export const getSupportedFrameworks = ({
return [];
}
- // @ts-ignore
+ // @ts-expect-error
return frameworksMap[moduleID][dataSourceName];
};
diff --git a/frontend/src/container/OnboardingQuestionaire/__tests__/OnboardingQuestionaire.test.tsx b/frontend/src/container/OnboardingQuestionaire/__tests__/OnboardingQuestionaire.test.tsx
index 961bd4bbb4..a58648f94b 100644
--- a/frontend/src/container/OnboardingQuestionaire/__tests__/OnboardingQuestionaire.test.tsx
+++ b/frontend/src/container/OnboardingQuestionaire/__tests__/OnboardingQuestionaire.test.tsx
@@ -103,9 +103,9 @@ describe('OnboardingQuestionaire Component', () => {
const othersCheckbox = screen.getByLabelText(/^others$/i);
await user.click(othersCheckbox);
- expect(
- await screen.findByPlaceholderText(/what tool do you currently use/i),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByPlaceholderText(/what tool do you currently use/i),
+ ).resolves.toBeInTheDocument();
});
it('shows migration timeline options only when specific observability tools are selected', async () => {
@@ -120,9 +120,9 @@ describe('OnboardingQuestionaire Component', () => {
const datadogCheckbox = screen.getByLabelText(/datadog/i);
await user.click(datadogCheckbox);
- expect(
- await screen.findByText(/What is your timeline for migrating to SigNoz/i),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText(/What is your timeline for migrating to SigNoz/i),
+ ).resolves.toBeInTheDocument();
// Not visible when None is selected
const noneCheckbox = screen.getByLabelText(/none\/starting fresh/i);
@@ -144,9 +144,9 @@ describe('OnboardingQuestionaire Component', () => {
const nextButton = screen.getByRole('button', { name: /next/i });
await user.click(nextButton);
- expect(
- await screen.findByText(/how did you first come across signoz/i, {}),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText(/how did you first come across signoz/i, {}),
+ ).resolves.toBeInTheDocument();
});
});
@@ -162,12 +162,12 @@ describe('OnboardingQuestionaire Component', () => {
await user.click(screen.getByLabelText(/just exploring/i));
await user.click(screen.getByRole('button', { name: /next/i }));
- expect(
- await screen.findByText(/set up your workspace/i, {}),
- ).toBeInTheDocument();
- expect(
- await screen.findByText(/how did you first come across signoz/i, {}),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText(/set up your workspace/i, {}),
+ ).resolves.toBeInTheDocument();
+ await expect(
+ screen.findByText(/how did you first come across signoz/i, {}),
+ ).resolves.toBeInTheDocument();
});
it('disables next button when fields are empty', async () => {
@@ -198,9 +198,9 @@ describe('OnboardingQuestionaire Component', () => {
await user.click(screen.getByLabelText(/just exploring/i));
await user.click(screen.getByRole('button', { name: /next/i }));
- expect(
- await screen.findByPlaceholderText(/e\.g\., googling/i, {}),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByPlaceholderText(/e\.g\., googling/i, {}),
+ ).resolves.toBeInTheDocument();
const discoverInput = screen.getByPlaceholderText(/e\.g\., googling/i);
await user.type(discoverInput, 'Found via Google search');
@@ -225,19 +225,16 @@ describe('OnboardingQuestionaire Component', () => {
await user.click(screen.getByLabelText(/just exploring/i));
await user.click(screen.getByRole('button', { name: /next/i }));
- expect(
- await screen.findByText(/what got you interested in signoz/i, {}),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText(/what got you interested in signoz/i, {}),
+ ).resolves.toBeInTheDocument();
const othersCheckbox = screen.getByLabelText(/^others$/i);
await user.click(othersCheckbox);
- expect(
- await screen.findByPlaceholderText(
- /what got you interested in signoz/i,
- {},
- ),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByPlaceholderText(/what got you interested in signoz/i, {}),
+ ).resolves.toBeInTheDocument();
});
});
@@ -253,9 +250,9 @@ describe('OnboardingQuestionaire Component', () => {
await user.click(screen.getByLabelText(/just exploring/i));
await user.click(screen.getByRole('button', { name: /next/i }));
- expect(
- await screen.findByPlaceholderText(/e\.g\., googling/i, {}),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByPlaceholderText(/e\.g\., googling/i, {}),
+ ).resolves.toBeInTheDocument();
await user.type(
screen.getByPlaceholderText(/e\.g\., googling/i),
@@ -264,16 +261,15 @@ describe('OnboardingQuestionaire Component', () => {
await user.click(screen.getByLabelText(/lowering observability costs/i));
await user.click(screen.getByRole('button', { name: /next/i }));
- expect(
- await screen.findByText(
- /what does your scale approximately look like/i,
- {},
- ),
- ).toBeInTheDocument();
- expect(await screen.findByText(/logs \/ day/i, {})).toBeInTheDocument();
- expect(
- await screen.findByText(/number of services/i, {}),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText(/what does your scale approximately look like/i, {}),
+ ).resolves.toBeInTheDocument();
+ await expect(
+ screen.findByText(/logs \/ day/i, {}),
+ ).resolves.toBeInTheDocument();
+ await expect(
+ screen.findByText(/number of services/i, {}),
+ ).resolves.toBeInTheDocument();
});
it('fires PUT to /zeus/profiles and advances to step 4 on success', async () => {
@@ -327,9 +323,9 @@ describe('OnboardingQuestionaire Component', () => {
await user.click(screen.getByLabelText(/just exploring/i));
await user.click(screen.getByRole('button', { name: /next/i }));
- expect(
- await screen.findByPlaceholderText(/e\.g\., googling/i, {}),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByPlaceholderText(/e\.g\., googling/i, {}),
+ ).resolves.toBeInTheDocument();
await user.type(
screen.getByPlaceholderText(/e\.g\., googling/i),
@@ -338,9 +334,9 @@ describe('OnboardingQuestionaire Component', () => {
await user.click(screen.getByLabelText(/lowering observability costs/i));
await user.click(screen.getByRole('button', { name: /next/i }));
- expect(
- await screen.findByRole('button', { name: /i'll do this later/i }),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByRole('button', { name: /i'll do this later/i }),
+ ).resolves.toBeInTheDocument();
});
});
});
diff --git a/frontend/src/container/OrganizationSettings/AuthDomain/__tests__/CreateEdit.test.tsx b/frontend/src/container/OrganizationSettings/AuthDomain/__tests__/CreateEdit.test.tsx
index 5d259515fc..8f4b894b85 100644
--- a/frontend/src/container/OrganizationSettings/AuthDomain/__tests__/CreateEdit.test.tsx
+++ b/frontend/src/container/OrganizationSettings/AuthDomain/__tests__/CreateEdit.test.tsx
@@ -46,16 +46,16 @@ describe('CreateEdit Modal', () => {
// Tooltip mouseEnterDelay timers it triggers on the Configure button.
fireEvent.click(configureButtons[0]);
- expect(
- await screen.findByText(/edit google authentication/i),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText(/edit google authentication/i),
+ ).resolves.toBeInTheDocument();
const backButton = screen.getByRole('button', { name: /back/i });
fireEvent.click(backButton);
- expect(
- await screen.findByText(/configure authentication method/i),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText(/configure authentication method/i),
+ ).resolves.toBeInTheDocument();
});
});
diff --git a/frontend/src/container/PipelinePage/Layouts/ChangeHistory/tests/ChangeHistory.test.tsx b/frontend/src/container/PipelinePage/Layouts/ChangeHistory/tests/ChangeHistory.test.tsx
index 7b7869bf6c..36beb1acef 100644
--- a/frontend/src/container/PipelinePage/Layouts/ChangeHistory/tests/ChangeHistory.test.tsx
+++ b/frontend/src/container/PipelinePage/Layouts/ChangeHistory/tests/ChangeHistory.test.tsx
@@ -45,8 +45,8 @@ describe('ChangeHistory test', () => {
].forEach((text) => expect(getByText(text)).toBeInTheDocument());
// table content
- expect(getAllByText('test-user').length).toBe(2);
- expect(getAllByText('Deployment was successful').length).toBe(2);
+ expect(getAllByText('test-user')).toHaveLength(2);
+ expect(getAllByText('Deployment was successful')).toHaveLength(2);
});
it('test deployment stage and icon based on history data', () => {
@@ -88,6 +88,6 @@ describe('ChangeHistory test', () => {
).toBeInTheDocument();
expect(getByText('Unknown')).toBeInTheDocument();
- expect(container.querySelectorAll('.ant-table-row').length).toBe(5);
+ expect(container.querySelectorAll('.ant-table-row')).toHaveLength(5);
});
});
diff --git a/frontend/src/container/PipelinePage/PipelineListsView/AddNewPipeline/FormFields/FilterInput/index.tsx b/frontend/src/container/PipelinePage/PipelineListsView/AddNewPipeline/FormFields/FilterInput/index.tsx
index ec8b2a7fa4..99f02455fe 100644
--- a/frontend/src/container/PipelinePage/PipelineListsView/AddNewPipeline/FormFields/FilterInput/index.tsx
+++ b/frontend/src/container/PipelinePage/PipelineListsView/AddNewPipeline/FormFields/FilterInput/index.tsx
@@ -73,7 +73,7 @@ function FilterInput({ fieldData }: FilterInputProps): JSX.Element {
name={fieldData.name}
>
{/* Antd form will supply value and onChange here.
- // @ts-ignore */}
+ // @ts-expect-error */}
<TagFilterInputWithLogsResultPreview
placeholder={t(fieldData.placeholder)}
/>
diff --git a/frontend/src/container/PipelinePage/tests/PipelineListsView.test.tsx b/frontend/src/container/PipelinePage/tests/PipelineListsView.test.tsx
index 8b5b2fa7a7..36184f6219 100644
--- a/frontend/src/container/PipelinePage/tests/PipelineListsView.test.tsx
+++ b/frontend/src/container/PipelinePage/tests/PipelineListsView.test.tsx
@@ -118,7 +118,7 @@ describe('PipelinePage container test', () => {
);
// content assertion
- expect(container.querySelectorAll('.ant-table-row').length).toBe(2);
+ expect(container.querySelectorAll('.ant-table-row')).toHaveLength(2);
expect(getByText('Apache common parser')).toBeInTheDocument();
expect(getByText('source = nginx')).toBeInTheDocument();
@@ -142,14 +142,14 @@ describe('PipelinePage container test', () => {
);
// content assertion
- expect(document.querySelectorAll('[data-icon="edit"]').length).toBe(2);
+ expect(document.querySelectorAll('[data-icon="edit"]')).toHaveLength(2);
expect(getByText('add_new_pipeline')).toBeInTheDocument();
// expand action
const expandIcon = document.querySelectorAll(
'.ant-table-row-expand-icon-cell > span[class*="anticon-right"]',
);
- expect(expandIcon.length).toBe(2);
+ expect(expandIcon).toHaveLength(2);
await fireEvent.click(expandIcon[0]);
@@ -175,13 +175,13 @@ describe('PipelinePage container test', () => {
);
// content assertion
- expect(document.querySelectorAll('[data-icon="edit"]').length).toBe(2);
+ expect(document.querySelectorAll('[data-icon="edit"]')).toHaveLength(2);
// expand action
const expandIcon = document.querySelectorAll(
'.ant-table-row-expand-icon-cell > span[class*="anticon-right"]',
);
- expect(expandIcon.length).toBe(2);
+ expect(expandIcon).toHaveLength(2);
await fireEvent.click(expandIcon[0]);
const switchToggle = document.querySelector(
@@ -196,7 +196,7 @@ describe('PipelinePage container test', () => {
'.ant-table-expanded-row [data-icon="delete"]',
);
- expect(deleteBtns.length).toBe(3);
+ expect(deleteBtns).toHaveLength(3);
// delete pipeline
await fireEvent.click(deleteBtns[0] as HTMLElement);
@@ -215,9 +215,8 @@ describe('PipelinePage container test', () => {
);
expect(
- document.querySelectorAll('.ant-table-expanded-row [data-icon="delete"]')
- .length,
- ).toBe(2);
+ document.querySelectorAll('.ant-table-expanded-row [data-icon="delete"]'),
+ ).toHaveLength(2);
});
it('should be able to toggle and delete pipeline', async () => {
@@ -250,12 +249,12 @@ describe('PipelinePage container test', () => {
const viewPipelineModal = document.querySelector('.ant-modal-wrap');
expect(viewPipelineModal).toBeInTheDocument();
- expect(
- await findByText(
+ await expect(
+ findByText(
viewPipelineModal as unknown as HTMLElement,
'Simulate Processing',
),
- ).toBeInTheDocument();
+ ).resolves.toBeInTheDocument();
await fireEvent.click(
viewPipelineModal?.querySelector(
@@ -282,7 +281,7 @@ describe('PipelinePage container test', () => {
document.querySelector('.delete-pipeline-ok-text') as HTMLElement,
);
- expect(document.querySelectorAll('[data-icon="delete"]').length).toBe(1);
+ expect(document.querySelectorAll('[data-icon="delete"]')).toHaveLength(1);
const saveBtn = getByText('save_configuration');
expect(saveBtn).toBeInTheDocument();
@@ -305,13 +304,13 @@ describe('PipelinePage container test', () => {
);
// content assertion
- expect(document.querySelectorAll('[data-icon="edit"]').length).toBe(2);
+ expect(document.querySelectorAll('[data-icon="edit"]')).toHaveLength(2);
// expand action
const expandIcon = document.querySelectorAll(
'.ant-table-row-expand-icon-cell > span[class*="anticon-right"]',
);
- expect(expandIcon.length).toBe(2);
+ expect(expandIcon).toHaveLength(2);
await fireEvent.click(expandIcon[0]);
const editBtn = document.querySelectorAll('[data-icon="edit"]');
@@ -319,7 +318,7 @@ describe('PipelinePage container test', () => {
await fireEvent.click(editBtn[0] as HTMLElement);
// to have length 2
- expect(screen.queryAllByText('source = nginx').length).toBe(2);
+ expect(screen.queryAllByText('source = nginx')).toHaveLength(2);
server.use(
rest.get(attributeKeysURL, (_req, res, ctx) =>
diff --git a/frontend/src/container/PipelinePage/tests/utils.test.ts b/frontend/src/container/PipelinePage/tests/utils.test.ts
index c21e8c5a4b..9e2caec476 100644
--- a/frontend/src/container/PipelinePage/tests/utils.test.ts
+++ b/frontend/src/container/PipelinePage/tests/utils.test.ts
@@ -12,53 +12,53 @@ import {
} from '../PipelineListsView/utils';
describe('Utils testing of Pipeline Page', () => {
- test('it should be check form field of add pipeline', () => {
- expect(pipelineFields.length).toBe(3);
+ it('should be check form field of add pipeline', () => {
+ expect(pipelineFields).toHaveLength(3);
expect(pipelineFields.length).toBeGreaterThan(1);
});
- test('it should be check processor types field of add pipeline', () => {
+ it('should be check processor types field of add pipeline', () => {
expect(processorTypes.length).toBeGreaterThan(1);
});
- test('it should check form field of add processor', () => {
+ it('should check form field of add processor', () => {
Object.keys(processorFields).forEach((key) => {
expect(processorFields[key].length).toBeGreaterThan(1);
});
});
- test('it should be check data length of pipeline', () => {
- expect(pipelineMockData.length).toBe(2);
+ it('should be check data length of pipeline', () => {
+ expect(pipelineMockData).toHaveLength(2);
expect(pipelineMockData.length).toBeGreaterThan(0);
});
- test('it should be return filtered data and perform deletion', () => {
+ it('should be return filtered data and perform deletion', () => {
const filterData = getElementFromArray(
pipelineMockData,
pipelineMockData[0],
'id',
);
- expect(pipelineMockData).not.toEqual(filterData);
- expect(pipelineMockData[0]).not.toEqual(filterData);
+ expect(pipelineMockData).not.toStrictEqual(filterData);
+ expect(pipelineMockData[0]).not.toStrictEqual(filterData);
});
- test('it should be return index data and perform deletion', () => {
+ it('should be return index data and perform deletion', () => {
const findRecordIndex = getRecordIndex(
pipelineMockData,
pipelineMockData[0],
'id',
);
- expect(pipelineMockData).not.toEqual(findRecordIndex);
- expect(pipelineMockData[0]).not.toEqual(findRecordIndex);
+ expect(pipelineMockData).not.toStrictEqual(findRecordIndex);
+ expect(pipelineMockData[0]).not.toStrictEqual(findRecordIndex);
});
- test('it should be return modified column data', () => {
+ it('should be return modified column data', () => {
const columnData = getTableColumn(processorColumns);
- expect(processorColumns).not.toEqual(columnData);
- expect(processorColumns.length).toEqual(columnData.length);
+ expect(processorColumns).not.toStrictEqual(columnData);
+ expect(processorColumns).toHaveLength(columnData.length);
});
- test('it should be return modified column data', () => {
+ it('should be return modified column data', () => {
const findRecordIndex = getRecordIndex(
pipelineMockData,
pipelineMockData[0],
@@ -77,12 +77,12 @@ describe('Utils testing of Pipeline Page', () => {
'name',
updatedPipelineData,
);
- expect(pipelineMockData).not.toEqual(editedData);
- expect(pipelineMockData.length).toEqual(editedData.length);
- expect(pipelineMockData[0].name).not.toEqual(editedData[0].name);
- expect(pipelineMockData[0].description).not.toEqual(
+ expect(pipelineMockData).not.toStrictEqual(editedData);
+ expect(pipelineMockData).toHaveLength(editedData.length);
+ expect(pipelineMockData[0].name).not.toStrictEqual(editedData[0].name);
+ expect(pipelineMockData[0].description).not.toStrictEqual(
editedData[0].description,
);
- expect(pipelineMockData[0].tags).not.toEqual(editedData[0].tags);
+ expect(pipelineMockData[0].tags).not.toStrictEqual(editedData[0].tags);
});
});
diff --git a/frontend/src/container/QueryBuilder/components/RunQueryBtn/__test__/RunQueryBtn.test.tsx b/frontend/src/container/QueryBuilder/components/RunQueryBtn/__test__/RunQueryBtn.test.tsx
index bcf8d3ccea..6e0cebd678 100644
--- a/frontend/src/container/QueryBuilder/components/RunQueryBtn/__test__/RunQueryBtn.test.tsx
+++ b/frontend/src/container/QueryBuilder/components/RunQueryBtn/__test__/RunQueryBtn.test.tsx
@@ -18,7 +18,7 @@ describe('RunQueryBtn', () => {
);
});
- test('renders run state and triggers on click', async () => {
+ it('renders run state and triggers on click', async () => {
const user = userEvent.setup();
const onRun = jest.fn();
const onCancel = jest.fn();
@@ -35,7 +35,7 @@ describe('RunQueryBtn', () => {
expect(onRun).toHaveBeenCalledTimes(1);
});
- test('shows cancel state and calls handleCancelQuery', async () => {
+ it('shows cancel state and calls handleCancelQuery', async () => {
const user = userEvent.setup();
const onRun = jest.fn();
const onCancel = jest.fn();
@@ -51,19 +51,19 @@ describe('RunQueryBtn', () => {
expect(onCancel).toHaveBeenCalledTimes(1);
});
- test('disabled when disabled prop is true', () => {
+ it('disabled when disabled prop is true', () => {
render(<RunQueryBtn disabled />);
expect(screen.getByRole('button', { name: /run query/i })).toBeDisabled();
});
- test('disabled when no props provided', () => {
+ it('disabled when no props provided', () => {
render(<RunQueryBtn />);
expect(
screen.getByRole('button', { name: /run query/i }),
).toBeInTheDocument();
});
- test('shows Command + CornerDownLeft on mac', () => {
+ it('shows Command + CornerDownLeft on mac', () => {
const { container } = render(
<RunQueryBtn
onStageRunQuery={jest.fn()}
@@ -77,7 +77,7 @@ describe('RunQueryBtn', () => {
).toBeInTheDocument();
});
- test('shows ChevronUp + CornerDownLeft on non-mac', () => {
+ it('shows ChevronUp + CornerDownLeft on non-mac', () => {
(getUserOperatingSystem as jest.Mock).mockReturnValue(
UserOperatingSystem.WINDOWS,
);
@@ -95,7 +95,7 @@ describe('RunQueryBtn', () => {
).toBeInTheDocument();
});
- test('renders custom label when provided', () => {
+ it('renders custom label when provided', () => {
render(
<RunQueryBtn
onStageRunQuery={jest.fn()}
diff --git a/frontend/src/container/QueryBuilder/filters/GroupByFilter/__test__/GroupByFilter.test.tsx b/frontend/src/container/QueryBuilder/filters/GroupByFilter/__test__/GroupByFilter.test.tsx
index 63f059a57e..6154ef95a6 100644
--- a/frontend/src/container/QueryBuilder/filters/GroupByFilter/__test__/GroupByFilter.test.tsx
+++ b/frontend/src/container/QueryBuilder/filters/GroupByFilter/__test__/GroupByFilter.test.tsx
@@ -83,7 +83,7 @@ describe('GroupByFilter', () => {
fireEvent.focus(select);
await waitFor(() => expect(dataSourceCalls.length).toBeGreaterThanOrEqual(1));
- expect(dataSourceCalls[0]).toEqual('meter');
+ expect(dataSourceCalls[0]).toBe('meter');
const input = select.querySelector('input') as HTMLInputElement;
const user = userEvent.setup({ pointerEventsCheck: 0 });
@@ -94,12 +94,12 @@ describe('GroupByFilter', () => {
await user.click(option);
expect(onChange).toHaveBeenCalled();
- expect(dataSourceCalls[dataSourceCalls.length - 1]).toEqual('meter');
+ expect(dataSourceCalls[dataSourceCalls.length - 1]).toBe('meter');
const emitted = onChange.mock.calls[0][0][0];
- expect(emitted.key).toEqual('custom.attr');
+ expect(emitted.key).toBe('custom.attr');
expect(emitted.id).toBeTruthy();
- expect(emitted.id).not.toEqual('----');
+ expect(emitted.id).not.toBe('----');
});
it('clicks suggested option and emits proper value', async () => {
server.use(
@@ -139,7 +139,7 @@ describe('GroupByFilter', () => {
// Expect payload to be resolved to the exact attribute returned by MSW
await waitFor(() => expect(onChange).toHaveBeenCalled());
const emitted = onChange.mock.calls[0][0][0];
- expect(emitted.key).toEqual('service.name');
- expect(emitted.id).toEqual('service.name--string--');
+ expect(emitted.key).toBe('service.name');
+ expect(emitted.id).toBe('service.name--string--');
});
});
diff --git a/frontend/src/container/QueryBuilder/filters/HavingFilter/__tests__/utils.test.tsx b/frontend/src/container/QueryBuilder/filters/HavingFilter/__tests__/utils.test.tsx
index c32200abaf..987a5d7528 100644
--- a/frontend/src/container/QueryBuilder/filters/HavingFilter/__tests__/utils.test.tsx
+++ b/frontend/src/container/QueryBuilder/filters/HavingFilter/__tests__/utils.test.tsx
@@ -25,7 +25,7 @@ const valueWithAttributeAndOperator: IBuilderQuery = {
};
describe('Having filter behaviour', () => {
- test('Having filter render is rendered', () => {
+ it('Having filter render is rendered', () => {
const mockFn = jest.fn();
const { unmount } = render(
<HavingFilter
@@ -44,7 +44,7 @@ describe('Having filter behaviour', () => {
unmount();
});
- test('Having render is disabled initially', () => {
+ it('Having render is disabled initially', () => {
const mockFn = jest.fn();
const { unmount } = render(
<HavingFilter
@@ -61,7 +61,7 @@ describe('Having filter behaviour', () => {
unmount();
});
- test('Is having filter is enable', () => {
+ it('Is having filter is enable', () => {
const mockFn = jest.fn();
const { unmount } = render(
<HavingFilter
@@ -78,7 +78,7 @@ describe('Having filter behaviour', () => {
unmount();
});
- test('Autocomplete in the having filter', async () => {
+ it('Autocomplete in the having filter', async () => {
const onChange = jest.fn();
const user = userEvent.setup();
@@ -126,7 +126,7 @@ describe('Having filter behaviour', () => {
// show operators after SUM(bytes)
const operatorsOptions = screen.getAllByTitle(optionTestTitle);
- expect(operatorsOptions.length).toEqual(HAVING_OPERATORS.length);
+ expect(operatorsOptions).toHaveLength(HAVING_OPERATORS.length);
// show operators after SUM(bytes) when type from keyboard
await user.clear(input);
@@ -136,7 +136,7 @@ describe('Having filter behaviour', () => {
// get filtered operators
const filteredOperators = screen.getAllByTitle(optionTestTitle);
- expect(filteredOperators.length).toEqual(1);
+ expect(filteredOperators).toHaveLength(1);
// clear and show again all operators
await user.clear(input);
@@ -144,7 +144,7 @@ describe('Having filter behaviour', () => {
const returnedOptions = screen.getAllByTitle(optionTestTitle);
- expect(returnedOptions.length).toEqual(HAVING_OPERATORS.length);
+ expect(returnedOptions).toHaveLength(HAVING_OPERATORS.length);
// check write value after operator
await user.clear(input);
diff --git a/frontend/src/container/QueryBuilder/filters/MetricNameSelector/MetricNameSelector.test.tsx b/frontend/src/container/QueryBuilder/filters/MetricNameSelector/MetricNameSelector.test.tsx
index 4808db65b3..3548df1820 100644
--- a/frontend/src/container/QueryBuilder/filters/MetricNameSelector/MetricNameSelector.test.tsx
+++ b/frontend/src/container/QueryBuilder/filters/MetricNameSelector/MetricNameSelector.test.tsx
@@ -350,8 +350,11 @@ describe('selecting a metric type updates the aggregation options', () => {
fireEvent.change(input, { target: { value: 'http_requests_total' } });
fireEvent.blur(input);
- expect(getOptionLabels('time-agg-options')).toEqual(['Rate', 'Increase']);
- expect(getOptionLabels('space-agg-options')).toEqual([
+ expect(getOptionLabels('time-agg-options')).toStrictEqual([
+ 'Rate',
+ 'Increase',
+ ]);
+ expect(getOptionLabels('space-agg-options')).toStrictEqual([
'Sum',
'Avg',
'Min',
@@ -373,7 +376,7 @@ describe('selecting a metric type updates the aggregation options', () => {
fireEvent.change(input, { target: { value: 'cpu_usage_percent' } });
fireEvent.blur(input);
- expect(getOptionLabels('time-agg-options')).toEqual([
+ expect(getOptionLabels('time-agg-options')).toStrictEqual([
'Latest',
'Sum',
'Avg',
@@ -382,7 +385,7 @@ describe('selecting a metric type updates the aggregation options', () => {
'Count',
'Count Distinct',
]);
- expect(getOptionLabels('space-agg-options')).toEqual([
+ expect(getOptionLabels('space-agg-options')).toStrictEqual([
'Sum',
'Avg',
'Min',
@@ -407,7 +410,7 @@ describe('selecting a metric type updates the aggregation options', () => {
});
fireEvent.blur(input);
- expect(getOptionLabels('time-agg-options')).toEqual([
+ expect(getOptionLabels('time-agg-options')).toStrictEqual([
'Latest',
'Sum',
'Avg',
@@ -416,7 +419,7 @@ describe('selecting a metric type updates the aggregation options', () => {
'Count',
'Count Distinct',
]);
- expect(getOptionLabels('space-agg-options')).toEqual([
+ expect(getOptionLabels('space-agg-options')).toStrictEqual([
'Sum',
'Avg',
'Min',
@@ -440,8 +443,8 @@ describe('selecting a metric type updates the aggregation options', () => {
});
fireEvent.blur(input);
- expect(getOptionLabels('time-agg-options')).toEqual([]);
- expect(getOptionLabels('space-agg-options')).toEqual([
+ expect(getOptionLabels('time-agg-options')).toStrictEqual([]);
+ expect(getOptionLabels('space-agg-options')).toStrictEqual([
'P50',
'P75',
'P90',
@@ -466,8 +469,8 @@ describe('selecting a metric type updates the aggregation options', () => {
});
fireEvent.blur(input);
- expect(getOptionLabels('time-agg-options')).toEqual([]);
- expect(getOptionLabels('space-agg-options')).toEqual([
+ expect(getOptionLabels('time-agg-options')).toStrictEqual([]);
+ expect(getOptionLabels('space-agg-options')).toStrictEqual([
'P50',
'P75',
'P90',
@@ -485,7 +488,7 @@ describe('selecting a metric type updates the aggregation options', () => {
fireEvent.change(input, { target: { value: 'unknown_metric' } });
fireEvent.blur(input);
- expect(getOptionLabels('time-agg-options')).toEqual([
+ expect(getOptionLabels('time-agg-options')).toStrictEqual([
'Max',
'Min',
'Sum',
@@ -494,7 +497,7 @@ describe('selecting a metric type updates the aggregation options', () => {
'Rate',
'Increase',
]);
- expect(getOptionLabels('space-agg-options')).toEqual([
+ expect(getOptionLabels('space-agg-options')).toStrictEqual([
'Sum',
'Avg',
'Min',
@@ -970,7 +973,7 @@ describe('Summary metric type is treated as Gauge', () => {
});
fireEvent.blur(input);
- expect(getOptionLabels('time-agg-options')).toEqual([
+ expect(getOptionLabels('time-agg-options')).toStrictEqual([
'Latest',
'Sum',
'Avg',
@@ -979,7 +982,7 @@ describe('Summary metric type is treated as Gauge', () => {
'Count',
'Count Distinct',
]);
- expect(getOptionLabels('space-agg-options')).toEqual([
+ expect(getOptionLabels('space-agg-options')).toStrictEqual([
'Sum',
'Avg',
'Min',
diff --git a/frontend/src/container/QueryBuilder/filters/QueryBuilderSearchV2/__test__/SpanScopeSelector.test.tsx b/frontend/src/container/QueryBuilder/filters/QueryBuilderSearchV2/__test__/SpanScopeSelector.test.tsx
index 404e721495..c804ac7ec3 100644
--- a/frontend/src/container/QueryBuilder/filters/QueryBuilderSearchV2/__test__/SpanScopeSelector.test.tsx
+++ b/frontend/src/container/QueryBuilder/filters/QueryBuilderSearchV2/__test__/SpanScopeSelector.test.tsx
@@ -203,7 +203,7 @@ describe('SpanScopeSelector', () => {
createSpanScopeFilter(filterKey),
]);
renderWithContext(queryWithFilter, undefined, defaultQueryBuilderQuery);
- expect(await screen.findByText(expectedText)).toBeInTheDocument();
+ await expect(screen.findByText(expectedText)).resolves.toBeInTheDocument();
},
);
});
@@ -238,17 +238,17 @@ describe('SpanScopeSelector', () => {
);
if (expectedScopeKey) {
- expect(scopeFiltersInPayload.length).toBe(1);
+ expect(scopeFiltersInPayload).toHaveLength(1);
expect(scopeFiltersInPayload[0].key?.key).toBe(expectedScopeKey);
expect(scopeFiltersInPayload[0].value).toBe('true');
expect(scopeFiltersInPayload[0].op).toBe('=');
} else {
- expect(scopeFiltersInPayload.length).toBe(0);
+ expect(scopeFiltersInPayload).toHaveLength(0);
}
const expectedTotalFilters =
expectedNonScopeItems.length + (expectedScopeKey ? 1 : 0);
- expect(items.length).toBe(expectedTotalFilters);
+ expect(items).toHaveLength(expectedTotalFilters);
};
beforeEach(() => {
@@ -259,19 +259,21 @@ describe('SpanScopeSelector', () => {
it('should initialize with ALL_SPANS if query prop has no scope filters', async () => {
const localQuery = createLocalQuery();
renderWithContext(defaultQuery, mockOnChange, localQuery);
- expect(await screen.findByText('All Spans')).toBeInTheDocument();
+ await expect(screen.findByText('All Spans')).resolves.toBeInTheDocument();
});
it('should initialize with ROOT_SPANS if query prop has isRoot filter', async () => {
const localQuery = createLocalQuery([createSpanScopeFilter('isRoot')]);
renderWithContext(defaultQuery, mockOnChange, localQuery);
- expect(await screen.findByText('Root Spans')).toBeInTheDocument();
+ await expect(screen.findByText('Root Spans')).resolves.toBeInTheDocument();
});
it('should initialize with ENTRYPOINT_SPANS if query prop has isEntryPoint filter', async () => {
const localQuery = createLocalQuery([createSpanScopeFilter('isEntryPoint')]);
renderWithContext(defaultQuery, mockOnChange, localQuery);
- expect(await screen.findByText('Entrypoint Spans')).toBeInTheDocument();
+ await expect(
+ screen.findByText('Entrypoint Spans'),
+ ).resolves.toBeInTheDocument();
});
it('should call onChange and not redirect when selecting ROOT_SPANS (from ALL_SPANS)', async () => {
@@ -282,7 +284,7 @@ describe('SpanScopeSelector', () => {
localQuery,
true,
);
- expect(await screen.findByText('All Spans')).toBeInTheDocument();
+ await expect(screen.findByText('All Spans')).resolves.toBeInTheDocument();
await selectOption('Root Spans');
@@ -302,7 +304,7 @@ describe('SpanScopeSelector', () => {
localQuery,
true,
);
- expect(await screen.findByText('Root Spans')).toBeInTheDocument();
+ await expect(screen.findByText('Root Spans')).resolves.toBeInTheDocument();
await selectOption('All Spans');
@@ -323,7 +325,7 @@ describe('SpanScopeSelector', () => {
localQuery,
true,
);
- expect(await screen.findByText('Root Spans')).toBeInTheDocument();
+ await expect(screen.findByText('Root Spans')).resolves.toBeInTheDocument();
await selectOption('Entrypoint Spans');
@@ -345,7 +347,7 @@ describe('SpanScopeSelector', () => {
localQuery,
true,
);
- expect(await screen.findByText('Root Spans')).toBeInTheDocument();
+ await expect(screen.findByText('Root Spans')).resolves.toBeInTheDocument();
await selectOption('Entrypoint Spans');
@@ -372,7 +374,9 @@ describe('SpanScopeSelector', () => {
localQuery,
true,
);
- expect(await screen.findByText('Entrypoint Spans')).toBeInTheDocument();
+ await expect(
+ screen.findByText('Entrypoint Spans'),
+ ).resolves.toBeInTheDocument();
await selectOption('All Spans');
@@ -418,7 +422,7 @@ describe('SpanScopeSelector', () => {
</QueryClientProvider>,
);
- expect(await screen.findByText('All Spans')).toBeInTheDocument();
+ await expect(screen.findByText('All Spans')).resolves.toBeInTheDocument();
await selectOption('Entrypoint Spans');
diff --git a/frontend/src/container/QueryTable/Drilldown/__tests__/Breakout.test.tsx b/frontend/src/container/QueryTable/Drilldown/__tests__/Breakout.test.tsx
index fd69dfbc2e..2013fc9d2e 100644
--- a/frontend/src/container/QueryTable/Drilldown/__tests__/Breakout.test.tsx
+++ b/frontend/src/container/QueryTable/Drilldown/__tests__/Breakout.test.tsx
@@ -236,10 +236,10 @@ describe('TableDrilldown Breakout Functionality', () => {
// Verify that the groupBy has been updated to only contain the selected breakout option
expect(aggregateQueryData.groupBy).toHaveLength(1);
- expect(aggregateQueryData.groupBy[0].key).toEqual('deployment.environment');
+ expect(aggregateQueryData.groupBy[0].key).toBe('deployment.environment');
// Verify that orderBy has been cleared (as per getBreakoutQuery logic)
- expect(aggregateQueryData.orderBy).toEqual([]);
+ expect(aggregateQueryData.orderBy).toStrictEqual([]);
// Verify that the legend has been updated (check the actual value being returned)
// The legend logic in getBreakoutQuery: legend: item.legend && groupBy.key ? `{{${groupBy.key}}}` : ''
@@ -247,7 +247,7 @@ describe('TableDrilldown Breakout Functionality', () => {
expect(aggregateQueryData.legend).toBeDefined();
// Check that the queryParams contain the expandedWidgetId
- expect(queryParams).toEqual({
+ expect(queryParams).toStrictEqual({
expandedWidgetId: 'test-widget',
graphType: 'graph',
});
diff --git a/frontend/src/container/QueryTable/Drilldown/__tests__/TableDrilldown.test.tsx b/frontend/src/container/QueryTable/Drilldown/__tests__/TableDrilldown.test.tsx
index f19ca41edb..8797de2c00 100644
--- a/frontend/src/container/QueryTable/Drilldown/__tests__/TableDrilldown.test.tsx
+++ b/frontend/src/container/QueryTable/Drilldown/__tests__/TableDrilldown.test.tsx
@@ -206,7 +206,7 @@ describe('TableDrilldown', () => {
expect(firstQueryData.filters).toBeDefined();
// Check that newTab option is set to true
- expect(options).toEqual({ newTab: true });
+ expect(options).toStrictEqual({ newTab: true });
});
it('should include timestamps in logs explorer URL when "View in Logs" is clicked', (): void => {
@@ -278,10 +278,12 @@ describe('TableDrilldown', () => {
// Check that the query contains the correct filter expression
// The filter should include the clicked data filters (service.name = 'adservice', trace_id = 'df2cfb0e57bb8736207689851478cd50')
const firstQueryData = compositeQuery.builder.queryData[0];
- expect(firstQueryData.filter.expression).toEqual(MOCK_QUERY_WITH_FILTER);
+ expect(firstQueryData.filter.expression).toStrictEqual(
+ MOCK_QUERY_WITH_FILTER,
+ );
// Check that newTab option is set to true
- expect(options).toEqual({ newTab: true });
+ expect(options).toStrictEqual({ newTab: true });
});
it('should include timestamps in traces explorer URL when "View in Traces" is clicked', (): void => {
@@ -358,7 +360,7 @@ describe('TableDrilldown', () => {
);
// Check that the queryParams contain the expandedWidgetId
- expect(queryParams).toEqual({ expandedWidgetId: 'test-widget' });
+ expect(queryParams).toStrictEqual({ expandedWidgetId: 'test-widget' });
// Check that newTab is true
expect(newTab).toBe(true);
diff --git a/frontend/src/container/QueryTable/__test__/QueryTable.test.tsx b/frontend/src/container/QueryTable/__test__/QueryTable.test.tsx
index 1c8b94f31b..53fedb473a 100644
--- a/frontend/src/container/QueryTable/__test__/QueryTable.test.tsx
+++ b/frontend/src/container/QueryTable/__test__/QueryTable.test.tsx
@@ -32,7 +32,7 @@ describe('QueryTable -', () => {
it('should render correctly with all the data rows', () => {
const { container } = render(<QueryTable {...QueryTableProps} />);
const tableRows = container.querySelectorAll('tr.ant-table-row');
- expect(tableRows.length).toBe(QueryTableProps.queryTableData.rows.length);
+ expect(tableRows).toHaveLength(QueryTableProps.queryTableData.rows.length);
});
it('should render correctly with searchTerm', () => {
@@ -40,7 +40,7 @@ describe('QueryTable -', () => {
<QueryTable {...QueryTableProps} searchTerm="frontend" />,
);
const tableRows = container.querySelectorAll('tr.ant-table-row');
- expect(tableRows.length).toBe(3);
+ expect(tableRows).toHaveLength(3);
});
});
diff --git a/frontend/src/container/RolesSettings/RoleDetails/__tests__/RoleDetailsPage.test.tsx b/frontend/src/container/RolesSettings/RoleDetails/__tests__/RoleDetailsPage.test.tsx
index f17f470485..3761cc7076 100644
--- a/frontend/src/container/RolesSettings/RoleDetails/__tests__/RoleDetailsPage.test.tsx
+++ b/frontend/src/container/RolesSettings/RoleDetails/__tests__/RoleDetailsPage.test.tsx
@@ -65,7 +65,9 @@ describe.skip('RoleDetailsPage', () => {
initialRoute: `/settings/roles/${CUSTOM_ROLE_ID}`,
});
- expect(await screen.findByText('Role — billing-manager')).toBeInTheDocument();
+ await expect(
+ screen.findByText('Role — billing-manager'),
+ ).resolves.toBeInTheDocument();
// Tab navigation
expect(screen.getByText('Overview')).toBeInTheDocument();
@@ -96,7 +98,9 @@ describe.skip('RoleDetailsPage', () => {
initialRoute: `/settings/roles/${MANAGED_ROLE_ID}`,
});
- expect(await screen.findByText(/Role — signoz-admin/)).toBeInTheDocument();
+ await expect(
+ screen.findByText(/Role — signoz-admin/),
+ ).resolves.toBeInTheDocument();
expect(
screen.getByText(
@@ -148,11 +152,11 @@ describe.skip('RoleDetailsPage', () => {
// Open the edit modal
await user.click(screen.getByRole('button', { name: /edit role details/i }));
- expect(
- await screen.findByText('Edit Role Details', {
+ await expect(
+ screen.findByText('Edit Role Details', {
selector: '.ant-modal-title',
}),
- ).toBeInTheDocument();
+ ).resolves.toBeInTheDocument();
// Name field is disabled in edit mode (role rename is not allowed)
const nameInput = screen.getByPlaceholderText(
@@ -182,7 +186,9 @@ describe.skip('RoleDetailsPage', () => {
).not.toBeInTheDocument(),
);
- expect(await screen.findByText('Updated description')).toBeInTheDocument();
+ await expect(
+ screen.findByText('Updated description'),
+ ).resolves.toBeInTheDocument();
});
it('delete flow: modal shows role name, DELETE called on confirm', async () => {
@@ -206,9 +212,9 @@ describe.skip('RoleDetailsPage', () => {
await user.click(screen.getByRole('button', { name: /delete role/i }));
- expect(
- await screen.findByText(/Are you sure you want to delete the role/),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText(/Are you sure you want to delete the role/),
+ ).resolves.toBeInTheDocument();
const dialog = await screen.findByRole('dialog');
await user.click(
diff --git a/frontend/src/container/RolesSettings/__tests__/RolesSettings.test.tsx b/frontend/src/container/RolesSettings/__tests__/RolesSettings.test.tsx
index a2364fd9e9..2ddef2f825 100644
--- a/frontend/src/container/RolesSettings/__tests__/RolesSettings.test.tsx
+++ b/frontend/src/container/RolesSettings/__tests__/RolesSettings.test.tsx
@@ -42,7 +42,7 @@ describe('RolesSettings', () => {
render(<RolesSettings />);
- expect(await screen.findByText('signoz-admin')).toBeInTheDocument();
+ await expect(screen.findByText('signoz-admin')).resolves.toBeInTheDocument();
// Section headers
expect(screen.getByText('Managed roles')).toBeInTheDocument();
@@ -76,14 +76,16 @@ describe('RolesSettings', () => {
render(<RolesSettings />);
- expect(await screen.findByText('signoz-admin')).toBeInTheDocument();
+ await expect(screen.findByText('signoz-admin')).resolves.toBeInTheDocument();
const user = userEvent.setup({ pointerEventsCheck: 0 });
const searchInput = screen.getByPlaceholderText('Search for roles...');
await user.type(searchInput, 'billing');
- expect(await screen.findByText('billing-manager')).toBeInTheDocument();
+ await expect(
+ screen.findByText('billing-manager'),
+ ).resolves.toBeInTheDocument();
expect(screen.queryByText('signoz-admin')).not.toBeInTheDocument();
expect(screen.queryByText('signoz-editor')).not.toBeInTheDocument();
expect(screen.queryByText('dashboard-creator')).not.toBeInTheDocument();
@@ -98,14 +100,14 @@ describe('RolesSettings', () => {
render(<RolesSettings />);
- expect(await screen.findByText('signoz-admin')).toBeInTheDocument();
+ await expect(screen.findByText('signoz-admin')).resolves.toBeInTheDocument();
const user = userEvent.setup({ pointerEventsCheck: 0 });
const searchInput = screen.getByPlaceholderText('Search for roles...');
await user.type(searchInput, 'read-only');
- expect(await screen.findByText('signoz-viewer')).toBeInTheDocument();
+ await expect(screen.findByText('signoz-viewer')).resolves.toBeInTheDocument();
expect(screen.queryByText('signoz-admin')).not.toBeInTheDocument();
expect(screen.queryByText('billing-manager')).not.toBeInTheDocument();
});
@@ -119,16 +121,16 @@ describe('RolesSettings', () => {
render(<RolesSettings />);
- expect(await screen.findByText('signoz-admin')).toBeInTheDocument();
+ await expect(screen.findByText('signoz-admin')).resolves.toBeInTheDocument();
const user = userEvent.setup({ pointerEventsCheck: 0 });
const searchInput = screen.getByPlaceholderText('Search for roles...');
await user.type(searchInput, 'nonexistentrole');
- expect(
- await screen.findByText('No roles match your search.'),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText('No roles match your search.'),
+ ).resolves.toBeInTheDocument();
});
it('shows loading skeleton while fetching', () => {
@@ -163,7 +165,7 @@ describe('RolesSettings', () => {
render(<RolesSettings />);
- expect(await screen.findByText(errorMessage)).toBeInTheDocument();
+ await expect(screen.findByText(errorMessage)).resolves.toBeInTheDocument();
});
it('shows empty state when API returns no roles', async () => {
@@ -175,7 +177,9 @@ describe('RolesSettings', () => {
render(<RolesSettings />);
- expect(await screen.findByText('No roles found.')).toBeInTheDocument();
+ await expect(
+ screen.findByText('No roles found.'),
+ ).resolves.toBeInTheDocument();
});
it('renders descriptions for all roles', async () => {
@@ -187,7 +191,7 @@ describe('RolesSettings', () => {
render(<RolesSettings />);
- expect(await screen.findByText('signoz-admin')).toBeInTheDocument();
+ await expect(screen.findByText('signoz-admin')).resolves.toBeInTheDocument();
for (const role of allRoles) {
if (role.description) {
@@ -221,7 +225,9 @@ describe('RolesSettings', () => {
render(<RolesSettings />);
- expect(await screen.findByText('invalid-date-role')).toBeInTheDocument();
+ await expect(
+ screen.findByText('invalid-date-role'),
+ ).resolves.toBeInTheDocument();
// Verify the "—" (em-dash) fallback is shown for both cells
const dashFallback = screen.getAllByText('—');
diff --git a/frontend/src/container/RolesSettings/__tests__/utils.test.ts b/frontend/src/container/RolesSettings/__tests__/utils.test.ts
index de2ffeb69d..8f297842cd 100644
--- a/frontend/src/container/RolesSettings/__tests__/utils.test.ts
+++ b/frontend/src/container/RolesSettings/__tests__/utils.test.ts
@@ -81,7 +81,7 @@ describe('buildPatchPayload', () => {
authzRes: baseAuthzResources,
});
- expect(result.additions).toEqual([
+ expect(result.additions).toStrictEqual([
{ resource: dashboardResource, selectors: [ID_B] },
]);
expect(result.deletions).toBeNull();
@@ -110,7 +110,7 @@ describe('buildPatchPayload', () => {
authzRes: baseAuthzResources,
});
- expect(result.deletions).toEqual([
+ expect(result.deletions).toStrictEqual([
{ resource: dashboardResource, selectors: [ID_B] },
]);
expect(result.additions).toBeNull();
@@ -163,10 +163,10 @@ describe('buildPatchPayload', () => {
authzRes: baseAuthzResources,
});
- expect(result.deletions).toEqual([
+ expect(result.deletions).toStrictEqual([
{ resource: dashboardResource, selectors: ['*'] },
]);
- expect(result.additions).toEqual([
+ expect(result.additions).toStrictEqual([
{ resource: dashboardResource, selectors: [ID_A, ID_B] },
]);
});
@@ -188,7 +188,7 @@ describe('buildPatchPayload', () => {
authzRes: baseAuthzResources,
});
- expect(result.deletions).toEqual([
+ expect(result.deletions).toStrictEqual([
{ resource: dashboardResource, selectors: ['*'] },
]);
expect(result.additions).toBeNull();
@@ -211,7 +211,7 @@ describe('buildPatchPayload', () => {
authzRes: baseAuthzResources,
});
- expect(result.additions).toEqual([
+ expect(result.additions).toStrictEqual([
{ resource: alertResource, selectors: [ID_B] },
]);
expect(result.deletions).toBeNull();
@@ -226,7 +226,7 @@ describe('objectsToPermissionConfig', () => {
const result = objectsToPermissionConfig(objects, resourceDefs);
- expect(result.dashboard).toEqual({
+ expect(result.dashboard).toStrictEqual({
scope: PermissionScope.ALL,
selectedIds: [],
});
@@ -239,7 +239,7 @@ describe('objectsToPermissionConfig', () => {
const result = objectsToPermissionConfig(objects, resourceDefs);
- expect(result.dashboard).toEqual({
+ expect(result.dashboard).toStrictEqual({
scope: PermissionScope.ONLY_SELECTED,
selectedIds: [ID_A, ID_B],
});
@@ -248,11 +248,11 @@ describe('objectsToPermissionConfig', () => {
it('defaults to ONLY_SELECTED with empty selectedIds when resource is absent from API response', () => {
const result = objectsToPermissionConfig([], resourceDefs);
- expect(result.dashboard).toEqual({
+ expect(result.dashboard).toStrictEqual({
scope: PermissionScope.ONLY_SELECTED,
selectedIds: [],
});
- expect(result.alert).toEqual({
+ expect(result.alert).toStrictEqual({
scope: PermissionScope.ONLY_SELECTED,
selectedIds: [],
});
@@ -321,18 +321,18 @@ describe('buildConfig', () => {
const result = buildConfig(resourceDefs, initial);
- expect(result.dashboard).toEqual({
+ expect(result.dashboard).toStrictEqual({
scope: PermissionScope.ALL,
selectedIds: [],
});
- expect(result.alert).toEqual(DEFAULT_RESOURCE_CONFIG);
+ expect(result.alert).toStrictEqual(DEFAULT_RESOURCE_CONFIG);
});
it('applies DEFAULT_RESOURCE_CONFIG to all resources when no initial is provided', () => {
const result = buildConfig(resourceDefs);
- expect(result.dashboard).toEqual(DEFAULT_RESOURCE_CONFIG);
- expect(result.alert).toEqual(DEFAULT_RESOURCE_CONFIG);
+ expect(result.dashboard).toStrictEqual(DEFAULT_RESOURCE_CONFIG);
+ expect(result.alert).toStrictEqual(DEFAULT_RESOURCE_CONFIG);
});
});
@@ -347,14 +347,14 @@ describe('derivePermissionTypes', () => {
const result = derivePermissionTypes(relations);
expect(result).toHaveLength(3);
- expect(result.map((p) => p.key)).toEqual(['create', 'read', 'delete']);
+ expect(result.map((p) => p.key)).toStrictEqual(['create', 'read', 'delete']);
expect(result[0].label).toBe('Create');
});
it('falls back to the default set of permission types when relations is null', () => {
const result = derivePermissionTypes(null);
- expect(result.map((p) => p.key)).toEqual([
+ expect(result.map((p) => p.key)).toStrictEqual([
'create',
'list',
'read',
@@ -369,7 +369,7 @@ describe('deriveResourcesForRelation', () => {
const result = deriveResourcesForRelation(baseAuthzResources, 'create');
expect(result).toHaveLength(2);
- expect(result.map((r) => r.id)).toEqual(['dashboard', 'alert']);
+ expect(result.map((r) => r.id)).toStrictEqual(['dashboard', 'alert']);
});
it('returns an empty array when authzResources is null', () => {
diff --git a/frontend/src/container/RoutingPolicies/__tests__/useRoutingPolicies.test.tsx b/frontend/src/container/RoutingPolicies/__tests__/useRoutingPolicies.test.tsx
index 586c3d99c7..ddb6aca94a 100644
--- a/frontend/src/container/RoutingPolicies/__tests__/useRoutingPolicies.test.tsx
+++ b/frontend/src/container/RoutingPolicies/__tests__/useRoutingPolicies.test.tsx
@@ -125,7 +125,7 @@ describe('useRoutingPolicies', () => {
expect(result.current.searchTerm).toBe('');
expect(result.current.routingPoliciesData).toHaveLength(2);
- expect(result.current.routingPoliciesData).toEqual(
+ expect(result.current.routingPoliciesData).toStrictEqual(
expect.arrayContaining([
expect.objectContaining({ name: MOCK_ROUTING_POLICY_1.name }),
expect.objectContaining({ name: MOCK_ROUTING_POLICY_2.name }),
diff --git a/frontend/src/container/ServiceAccountsSettings/__tests__/ServiceAccountsSettings.integration.test.tsx b/frontend/src/container/ServiceAccountsSettings/__tests__/ServiceAccountsSettings.integration.test.tsx
index 76bfbe3cc5..5f36aba704 100644
--- a/frontend/src/container/ServiceAccountsSettings/__tests__/ServiceAccountsSettings.integration.test.tsx
+++ b/frontend/src/container/ServiceAccountsSettings/__tests__/ServiceAccountsSettings.integration.test.tsx
@@ -174,9 +174,9 @@ describe('ServiceAccountsSettings (integration)', () => {
}),
);
- expect(
- await screen.findByRole('button', { name: /Delete Service Account/i }),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByRole('button', { name: /Delete Service Account/i }),
+ ).resolves.toBeInTheDocument();
});
it('saving changes in the drawer refetches the list', async () => {
@@ -250,10 +250,10 @@ describe('ServiceAccountsSettings (integration)', () => {
</NuqsTestingAdapter>,
);
- expect(
- await screen.findByText(
+ await expect(
+ screen.findByText(
/An unexpected error occurred while fetching service accounts/i,
),
- ).toBeInTheDocument();
+ ).resolves.toBeInTheDocument();
});
});
diff --git a/frontend/src/container/ServiceApplication/ServiceMetrics/ServiceMetrics.test.tsx b/frontend/src/container/ServiceApplication/ServiceMetrics/ServiceMetrics.test.tsx
index 4fa203ba67..5b333a35e0 100644
--- a/frontend/src/container/ServiceApplication/ServiceMetrics/ServiceMetrics.test.tsx
+++ b/frontend/src/container/ServiceApplication/ServiceMetrics/ServiceMetrics.test.tsx
@@ -22,7 +22,7 @@ describe('ServicesUsingMetrics', () => {
jest.clearAllMocks();
});
- test('should render the ServicesUsingMetrics component', async () => {
+ it('should render the ServicesUsingMetrics component', async () => {
// Mock successful API response
mockUseGetTopLevelOperations.mockReturnValue({
data: {
@@ -90,7 +90,7 @@ describe('ServicesUsingMetrics', () => {
expect(screen.getByText(/error rate \(% of total\)/i)).toBeInTheDocument();
});
- test('should render the ServicesUsingMetrics component with loading', async () => {
+ it('should render the ServicesUsingMetrics component with loading', async () => {
// Mock loading state
mockUseGetTopLevelOperations.mockReturnValue({
data: undefined,
@@ -124,7 +124,7 @@ describe('ServicesUsingMetrics', () => {
expect(screen.getByLabelText(/loading/i)).toBeInTheDocument();
});
- test('should not render if the data is not present', async () => {
+ it('should not render if the data is not present', async () => {
// Mock successful API response with data
mockUseGetTopLevelOperations.mockReturnValue({
data: {
diff --git a/frontend/src/container/ServiceApplication/ServiceTraces/ServicTraces.test.tsx b/frontend/src/container/ServiceApplication/ServiceTraces/ServicTraces.test.tsx
index fc6e97e4b4..e3865eae9c 100644
--- a/frontend/src/container/ServiceApplication/ServiceTraces/ServicTraces.test.tsx
+++ b/frontend/src/container/ServiceApplication/ServiceTraces/ServicTraces.test.tsx
@@ -3,7 +3,7 @@ import { act, fireEvent, render, screen } from 'tests/test-utils';
import ServiceTraces from '.';
describe('ServicesTraces', () => {
- test('Should render the component', async () => {
+ it('Should render the component', async () => {
await act(() => {
render(<ServiceTraces />);
});
@@ -15,7 +15,7 @@ describe('ServicesTraces', () => {
expect(errorRateHeader).toBeInTheDocument();
});
- test('Should render the Services with Services', async () => {
+ it('Should render the Services with Services', async () => {
act(() => {
render(<ServiceTraces />);
});
@@ -27,7 +27,7 @@ describe('ServicesTraces', () => {
expect(p99Latency).toBeInTheDocument();
});
- test('Should click on p99 latency and sort the table', async () => {
+ it('Should click on p99 latency and sort the table', async () => {
act(() => {
render(<ServiceTraces />);
});
diff --git a/frontend/src/container/SideNav/helper.test.ts b/frontend/src/container/SideNav/helper.test.ts
index ada551242e..f075f18427 100644
--- a/frontend/src/container/SideNav/helper.test.ts
+++ b/frontend/src/container/SideNav/helper.test.ts
@@ -9,7 +9,7 @@ describe('getQueryString', () => {
const result = getQueryString(availableParams, params);
- expect(result).toEqual(['param1=value1', 'param2=value2', '']);
+ expect(result).toStrictEqual(['param1=value1', 'param2=value2', '']);
});
it('returns an array of empty strings if no matching parameters are found', () => {
@@ -18,7 +18,7 @@ describe('getQueryString', () => {
const result = getQueryString(availableParams, params);
- expect(result).toEqual(['', '', '']);
+ expect(result).toStrictEqual(['', '', '']);
});
it('returns an empty array if the available parameters list is empty', () => {
@@ -29,6 +29,6 @@ describe('getQueryString', () => {
const result = getQueryString(availableParams, params);
- expect(result).toEqual([]);
+ expect(result).toStrictEqual([]);
});
});
diff --git a/frontend/src/container/Trace/Graph/config.ts b/frontend/src/container/Trace/Graph/config.ts
index 831825c477..c3e47476ea 100644
--- a/frontend/src/container/Trace/Graph/config.ts
+++ b/frontend/src/container/Trace/Graph/config.ts
@@ -71,7 +71,7 @@ export const getChartDataforGroupBy = (
const allGroupBy = Object.keys(items).map((e) => items[e].groupBy);
keys(allGroupBy).forEach((e: string): void => {
- // @ts-ignore
+ // @ts-expect-error
const { length } = keys(allGroupBy[e]);
if (length >= max) {
diff --git a/frontend/src/container/Trace/TraceGraphFilter/utils.test.ts b/frontend/src/container/Trace/TraceGraphFilter/utils.test.ts
index 24787194b3..fcfbf6bd04 100644
--- a/frontend/src/container/Trace/TraceGraphFilter/utils.test.ts
+++ b/frontend/src/container/Trace/TraceGraphFilter/utils.test.ts
@@ -15,13 +15,13 @@ describe('TraceGraphFilter/utils', () => {
it('should return the correct value', () => {
const selectedGroupBy = '1';
const result = selectedGroupByValue(selectedGroupBy, options);
- expect(result).toEqual(selectedGroupBy);
+ expect(result).toStrictEqual(selectedGroupBy);
});
it('should return the correct value when selectedOption not found', () => {
const selectedGroupBy = '3';
const result = selectedGroupByValue(selectedGroupBy, options);
- expect(result).toEqual(selectedGroupBy);
+ expect(result).toStrictEqual(selectedGroupBy);
});
});
diff --git a/frontend/src/container/TraceDetail/utils.test.ts b/frontend/src/container/TraceDetail/utils.test.ts
index afba7fa10f..5b4e5d8026 100644
--- a/frontend/src/container/TraceDetail/utils.test.ts
+++ b/frontend/src/container/TraceDetail/utils.test.ts
@@ -18,17 +18,17 @@ describe('traces/getTreeLevelsCount', () => {
statusMessage: '',
});
- test('should return 0 for empty tree', () => {
+ it('should return 0 for empty tree', () => {
const emptyTree = null;
expect(getTreeLevelsCount(emptyTree as unknown as ITraceTree)).toBe(0);
});
- test('should return 1 for a tree with a single node', () => {
+ it('should return 1 for a tree with a single node', () => {
const singleNodeTree = createNode('1');
expect(getTreeLevelsCount(singleNodeTree)).toBe(1);
});
- test('should return correct depth for a balanced tree', () => {
+ it('should return correct depth for a balanced tree', () => {
const tree = createNode('1', [
createNode('2', [createNode('4'), createNode('5')]),
createNode('3', [createNode('6'), createNode('7')]),
@@ -37,7 +37,7 @@ describe('traces/getTreeLevelsCount', () => {
expect(getTreeLevelsCount(tree)).toBe(3);
});
- test('should return correct depth for an unbalanced tree', () => {
+ it('should return correct depth for an unbalanced tree', () => {
const tree = createNode('1', [
createNode('2', [
createNode('4', [createNode('8', [createNode('11')])]),
@@ -49,7 +49,7 @@ describe('traces/getTreeLevelsCount', () => {
expect(getTreeLevelsCount(tree)).toBe(5);
});
- test('should return correct depth for a tree with single child nodes', () => {
+ it('should return correct depth for a tree with single child nodes', () => {
const tree = createNode('1', [
createNode('2', [createNode('3', [createNode('4', [createNode('5')])])]),
]);
diff --git a/frontend/src/container/TraceFlameGraph/__tests__/TraceFlameGraph.test.tsx b/frontend/src/container/TraceFlameGraph/__tests__/TraceFlameGraph.test.tsx
index 143d0806fa..d681d47761 100644
--- a/frontend/src/container/TraceFlameGraph/__tests__/TraceFlameGraph.test.tsx
+++ b/frontend/src/container/TraceFlameGraph/__tests__/TraceFlameGraph.test.tsx
@@ -5,7 +5,7 @@ import { render, renderHook } from '@testing-library/react';
import TraceFlameGraph from 'container/TraceFlameGraph';
import store from 'store';
-test('loads and displays greeting', () => {
+it('loads and displays greeting', () => {
const { rerender } = renderHook(() => useState(''));
const { asFragment } = render(
diff --git a/frontend/src/container/TriggeredAlerts/__tests__/NoFilterTable.test.tsx b/frontend/src/container/TriggeredAlerts/__tests__/NoFilterTable.test.tsx
index 18256fddb5..f3103f762e 100644
--- a/frontend/src/container/TriggeredAlerts/__tests__/NoFilterTable.test.tsx
+++ b/frontend/src/container/TriggeredAlerts/__tests__/NoFilterTable.test.tsx
@@ -67,7 +67,7 @@ describe('NoFilterTable', () => {
if (severityHeader) {
const initialRows = screen.getAllByRole('row');
- expect(initialRows.length).toBe(4);
+ expect(initialRows).toHaveLength(4);
expect(initialRows[1]).toHaveTextContent('Alert B');
expect(initialRows[2]).toHaveTextContent('Alert C');
expect(initialRows[3]).toHaveTextContent('Alert A');
@@ -75,7 +75,7 @@ describe('NoFilterTable', () => {
fireEvent.click(severityHeader);
const sortedRows = screen.getAllByRole('row');
- expect(sortedRows.length).toBe(4);
+ expect(sortedRows).toHaveLength(4);
expect(sortedRows[1]).toHaveTextContent('Alert A');
expect(sortedRows[2]).toHaveTextContent('Alert B');
expect(sortedRows[3]).toHaveTextContent('Alert C');
diff --git a/frontend/src/container/TriggeredAlerts/__tests__/utils.test.tsx b/frontend/src/container/TriggeredAlerts/__tests__/utils.test.tsx
index e042bc9522..4863ba5563 100644
--- a/frontend/src/container/TriggeredAlerts/__tests__/utils.test.tsx
+++ b/frontend/src/container/TriggeredAlerts/__tests__/utils.test.tsx
@@ -29,7 +29,7 @@ describe('FilterAlerts', () => {
const result = FilterAlerts(alerts, filters);
- expect(result).toEqual([criticalAlert]);
+ expect(result).toStrictEqual([criticalAlert]);
});
it('includes alerts when any filter matches', () => {
@@ -54,7 +54,7 @@ describe('FilterAlerts', () => {
const result = FilterAlerts(alerts, filters);
expect(result).toHaveLength(2);
- expect(result).toEqual([severityAlert, teamAlert]);
+ expect(result).toStrictEqual([severityAlert, teamAlert]);
});
it('matches labels even when filters contain surrounding whitespace', () => {
@@ -67,7 +67,7 @@ describe('FilterAlerts', () => {
const result = FilterAlerts(alerts, filters);
- expect(result).toEqual([alert]);
+ expect(result).toStrictEqual([alert]);
});
it('ignores filters that do not contain a key/value delimiter', () => {
@@ -80,6 +80,6 @@ describe('FilterAlerts', () => {
const result = FilterAlerts(alerts, filters);
- expect(result).toEqual([]);
+ expect(result).toStrictEqual([]);
});
});
diff --git a/frontend/src/hooks/__tests__/useUrlQueryData.test.tsx b/frontend/src/hooks/__tests__/useUrlQueryData.test.tsx
index 1f9d146ec7..fb8909e28a 100644
--- a/frontend/src/hooks/__tests__/useUrlQueryData.test.tsx
+++ b/frontend/src/hooks/__tests__/useUrlQueryData.test.tsx
@@ -42,35 +42,35 @@ describe('useUrlQueryData', () => {
};
describe('query parsing', () => {
- test('should parse valid JSON query parameter', () => {
+ it('should parse valid JSON query parameter', () => {
const testData = { name: 'test', value: 123 };
const { result } = renderHookWithRouter('testKey', {}, [
`/test?testKey=${encodeURIComponent(JSON.stringify(testData))}`,
]);
expect(result.current.query).toBe(JSON.stringify(testData));
- expect(result.current.queryData).toEqual(testData);
+ expect(result.current.queryData).toStrictEqual(testData);
});
- test('should return default data when query parameter is not present', () => {
+ it('should return default data when query parameter is not present', () => {
const defaultData = { default: 'value' };
const { result } = renderHookWithRouter('testKey', defaultData);
expect(result.current.query).toBeNull();
- expect(result.current.queryData).toEqual(defaultData);
+ expect(result.current.queryData).toStrictEqual(defaultData);
});
- test('should return default data when query parameter is empty', () => {
+ it('should return default data when query parameter is empty', () => {
const defaultData = { default: 'value' };
const { result } = renderHookWithRouter('testKey', defaultData, [
'/test?testKey=',
]);
expect(result.current.query).toBe('');
- expect(result.current.queryData).toEqual(defaultData);
+ expect(result.current.queryData).toStrictEqual(defaultData);
});
- test('should handle invalid JSON and return default data', () => {
+ it('should handle invalid JSON and return default data', () => {
const defaultData = { default: 'value' };
const consoleSpy = jest.spyOn(console, 'warn').mockImplementation();
@@ -79,7 +79,7 @@ describe('useUrlQueryData', () => {
]);
expect(result.current.query).toBe('invalid-json');
- expect(result.current.queryData).toEqual(defaultData);
+ expect(result.current.queryData).toStrictEqual(defaultData);
expect(consoleSpy).toHaveBeenCalledWith(
'Failed to parse query as JSON:',
'invalid-json',
@@ -89,7 +89,7 @@ describe('useUrlQueryData', () => {
consoleSpy.mockRestore();
});
- test('should handle malformed JSON and return default data', () => {
+ it('should handle malformed JSON and return default data', () => {
const defaultData = { default: 'value' };
const consoleSpy = jest.spyOn(console, 'warn').mockImplementation();
@@ -100,13 +100,13 @@ describe('useUrlQueryData', () => {
);
expect(result.current.query).toBe('{"name":"test",}');
- expect(result.current.queryData).toEqual(defaultData);
+ expect(result.current.queryData).toStrictEqual(defaultData);
expect(consoleSpy).toHaveBeenCalled();
consoleSpy.mockRestore();
});
- test('should handle complex nested objects', () => {
+ it('should handle complex nested objects', () => {
const complexData = {
users: [
{ id: 1, name: 'John', settings: { theme: 'dark', notifications: true } },
@@ -127,10 +127,10 @@ describe('useUrlQueryData', () => {
]);
expect(result.current.query).toBe(JSON.stringify(complexData));
- expect(result.current.queryData).toEqual(complexData);
+ expect(result.current.queryData).toStrictEqual(complexData);
});
- test('should handle primitive values', () => {
+ it('should handle primitive values', () => {
const stringData = 'simple string';
const { result } = renderHookWithRouter('stringKey', '', [
`/test?stringKey=${encodeURIComponent(JSON.stringify(stringData))}`,
@@ -142,7 +142,7 @@ describe('useUrlQueryData', () => {
});
describe('redirectWithQuery', () => {
- test('should navigate with new query data', () => {
+ it('should navigate with new query data', () => {
const { result } = renderHookWithRouter('testKey', {});
const newData = { name: 'new', value: 456 };
@@ -159,7 +159,7 @@ describe('useUrlQueryData', () => {
expect(urlParams.get('testKey')).toBe(JSON.stringify(newData));
});
- test('should preserve existing query parameters when adding new one', () => {
+ it('should preserve existing query parameters when adding new one', () => {
const { result } = renderHookWithRouter('newKey', {}, [
'/test?existingKey=existingValue',
]);
@@ -176,7 +176,7 @@ describe('useUrlQueryData', () => {
expect(urlParams.get('newKey')).toBe(JSON.stringify(newData));
});
- test('should update existing query parameter', () => {
+ it('should update existing query parameter', () => {
const initialData = { name: 'old' };
const { result } = renderHookWithRouter('testKey', {}, [
`/test?testKey=${encodeURIComponent(JSON.stringify(initialData))}`,
@@ -192,7 +192,7 @@ describe('useUrlQueryData', () => {
expect(urlParams.get('testKey')).toBe(JSON.stringify(newData));
});
- test('should handle complex data in redirectWithQuery', () => {
+ it('should handle complex data in redirectWithQuery', () => {
const { result } = renderHookWithRouter('complexKey', {});
const complexData = {
@@ -212,7 +212,7 @@ describe('useUrlQueryData', () => {
expect(urlParams.get('complexKey')).toBe(JSON.stringify(complexData));
});
- test('should handle primitive values in redirectWithQuery', () => {
+ it('should handle primitive values in redirectWithQuery', () => {
const { result } = renderHookWithRouter('primitiveKey', '');
act(() => {
@@ -224,7 +224,7 @@ describe('useUrlQueryData', () => {
expect(urlParams.get('primitiveKey')).toBe(JSON.stringify('simple string'));
});
- test('should handle null and undefined values', () => {
+ it('should handle null and undefined values', () => {
const { result } = renderHookWithRouter('nullKey', {});
act(() => {
@@ -246,7 +246,7 @@ describe('useUrlQueryData', () => {
});
describe('hook interface', () => {
- test('should return correct interface structure', () => {
+ it('should return correct interface structure', () => {
const { result } = renderHookWithRouter('testKey', {});
expect(result.current).toHaveProperty('query');
@@ -255,7 +255,7 @@ describe('useUrlQueryData', () => {
expect(typeof result.current.redirectWithQuery).toBe('function');
});
- test('should handle different query keys', () => {
+ it('should handle different query keys', () => {
const { result: result1 } = renderHookWithRouter('key1', {});
const { result: result2 } = renderHookWithRouter('key2', {});
@@ -275,7 +275,7 @@ describe('useUrlQueryData', () => {
});
describe('URL encoding/decoding', () => {
- test('should handle URL encoded query parameters', () => {
+ it('should handle URL encoded query parameters', () => {
const testData = { name: 'test with spaces', value: 'special&chars' };
const encodedData = encodeURIComponent(JSON.stringify(testData));
@@ -283,10 +283,10 @@ describe('useUrlQueryData', () => {
`/test?testKey=${encodedData}`,
]);
- expect(result.current.queryData).toEqual(testData);
+ expect(result.current.queryData).toStrictEqual(testData);
});
- test('should properly encode data in redirectWithQuery', () => {
+ it('should properly encode data in redirectWithQuery', () => {
const { result } = renderHookWithRouter('testKey', {});
const testData = { name: 'test with spaces', value: 'special&chars' };
@@ -299,7 +299,7 @@ describe('useUrlQueryData', () => {
const decodedValue = JSON.parse(
decodeURIComponent(urlParams.get('testKey') || ''),
);
- expect(decodedValue).toEqual(testData);
+ expect(decodedValue).toStrictEqual(testData);
});
});
});
diff --git a/frontend/src/hooks/dashboard/__test__/useDashboardsListQueryParams.test.ts b/frontend/src/hooks/dashboard/__test__/useDashboardsListQueryParams.test.ts
index aa2e3dcbb0..a51c969711 100644
--- a/frontend/src/hooks/dashboard/__test__/useDashboardsListQueryParams.test.ts
+++ b/frontend/src/hooks/dashboard/__test__/useDashboardsListQueryParams.test.ts
@@ -43,7 +43,7 @@ describe('useDashboardsListQueryParams', () => {
wrapper: createTestWrapper('/dashboard'),
});
- expect(result.current.dashboardsListQueryParams).toEqual({
+ expect(result.current.dashboardsListQueryParams).toStrictEqual({
columnKey: 'updatedAt',
order: 'descend',
page: '1',
@@ -58,7 +58,7 @@ describe('useDashboardsListQueryParams', () => {
),
});
- expect(result.current.dashboardsListQueryParams).toEqual({
+ expect(result.current.dashboardsListQueryParams).toStrictEqual({
columnKey: 'createdAt',
order: 'ascend',
page: '3',
@@ -116,7 +116,7 @@ describe('useDashboardsListQueryParams', () => {
result.current.updateDashboardsListQueryParams(updated);
});
- expect(result.current.dashboardsListQueryParams).toEqual(updated);
+ expect(result.current.dashboardsListQueryParams).toStrictEqual(updated);
});
it('does not update state when params are identical', () => {
@@ -181,7 +181,7 @@ describe('useDashboardsListQueryParams', () => {
const storedParams = Object.fromEntries(
new URLSearchParams(stored || '').entries(),
);
- expect(storedParams).toEqual(updated);
+ expect(storedParams).toStrictEqual(updated);
});
it('still calls safeNavigate even when params are unchanged', () => {
diff --git a/frontend/src/hooks/dashboard/__test__/useTransformDashboardVariables.test.tsx b/frontend/src/hooks/dashboard/__test__/useTransformDashboardVariables.test.tsx
index 01e2615123..d23a733959 100644
--- a/frontend/src/hooks/dashboard/__test__/useTransformDashboardVariables.test.tsx
+++ b/frontend/src/hooks/dashboard/__test__/useTransformDashboardVariables.test.tsx
@@ -292,7 +292,7 @@ describe('useTransformDashboardVariables', () => {
const result = transformDashboardVariables(dashboard);
- expect(result.data.variables.v1.selectedValue).toEqual(['prod']);
+ expect(result.data.variables.v1.selectedValue).toStrictEqual(['prod']);
});
it('looks up URL variable by variable id when name is absent', () => {
@@ -317,7 +317,7 @@ describe('useTransformDashboardVariables', () => {
const result = transformDashboardVariables(dashboard);
- expect(result.data.variables).toEqual({});
+ expect(result.data.variables).toStrictEqual({});
});
it('does not mutate the original dashboard', () => {
diff --git a/frontend/src/hooks/dashboard/__test__/useVariablesFromUrl.test.tsx b/frontend/src/hooks/dashboard/__test__/useVariablesFromUrl.test.tsx
index 32dd6cd18c..40b8300fd7 100644
--- a/frontend/src/hooks/dashboard/__test__/useVariablesFromUrl.test.tsx
+++ b/frontend/src/hooks/dashboard/__test__/useVariablesFromUrl.test.tsx
@@ -20,7 +20,7 @@ describe('useVariablesFromUrl', () => {
),
});
- expect(result.current.getUrlVariables()).toEqual({});
+ expect(result.current.getUrlVariables()).toStrictEqual({});
});
it('should correctly parse variables from URL', () => {
@@ -41,7 +41,7 @@ describe('useVariablesFromUrl', () => {
),
});
- expect(result.current.getUrlVariables()).toEqual(mockVariables);
+ expect(result.current.getUrlVariables()).toStrictEqual(mockVariables);
});
it('should handle malformed URL parameters gracefully', () => {
@@ -56,7 +56,7 @@ describe('useVariablesFromUrl', () => {
});
// Should return empty object when JSON parsing fails
- expect(result.current.getUrlVariables()).toEqual({});
+ expect(result.current.getUrlVariables()).toStrictEqual({});
});
it('should set variables to URL correctly', () => {
@@ -84,7 +84,7 @@ describe('useVariablesFromUrl', () => {
const urlVariables = searchParams.get(QueryParams.variables);
expect(urlVariables).toBeTruthy();
- expect(JSON.parse(decodeURIComponent(urlVariables || ''))).toEqual(
+ expect(JSON.parse(decodeURIComponent(urlVariables || ''))).toStrictEqual(
mockVariables,
);
});
@@ -140,8 +140,8 @@ describe('useVariablesFromUrl', () => {
// Check if only the specified variable was updated
const updatedVariables = result.current.getUrlVariables();
- expect(updatedVariables.var1).toEqual(newValue);
- expect(updatedVariables.var2).toEqual(initialVariables.var2);
+ expect(updatedVariables.var1).toStrictEqual(newValue);
+ expect(updatedVariables.var2).toStrictEqual(initialVariables.var2);
});
it('should preserve other URL parameters when updating variables', () => {
@@ -194,8 +194,8 @@ describe('useVariablesFromUrl', () => {
expect(urlVariables.stringVar).toBe('production');
expect(urlVariables.numberVar).toBe(123);
expect(urlVariables.booleanVar).toBe(true);
- expect(urlVariables.arrayVar).toEqual(['service1', 'service2']);
- expect(urlVariables.mixedArrayVar).toEqual(['string', 456, false]);
+ expect(urlVariables.arrayVar).toStrictEqual(['service1', 'service2']);
+ expect(urlVariables.mixedArrayVar).toStrictEqual(['string', 456, false]);
expect(urlVariables.nullVar).toBeNull();
});
@@ -221,8 +221,8 @@ describe('useVariablesFromUrl', () => {
const urlVariables = result.current.getUrlVariables();
expect(urlVariables.emptyString).toBe('');
- expect(urlVariables.emptyArray).toEqual([]);
- expect(urlVariables.singleItemArray).toEqual(['solo']);
+ expect(urlVariables.emptyArray).toStrictEqual([]);
+ expect(urlVariables.singleItemArray).toStrictEqual(['solo']);
expect(urlVariables.undefinedVar).toBeUndefined();
});
@@ -243,7 +243,7 @@ describe('useVariablesFromUrl', () => {
// Should parse successfully via the raw fallback, not throw or return {}
const vars = result.current.getUrlVariables();
- expect(vars).toEqual({ threshold: '50%' });
+ expect(vars).toStrictEqual({ threshold: '50%' });
});
it('should return empty object when URL param is completely unparseable', () => {
@@ -258,7 +258,7 @@ describe('useVariablesFromUrl', () => {
),
});
- expect(result.current.getUrlVariables()).toEqual({});
+ expect(result.current.getUrlVariables()).toStrictEqual({});
});
it('should update variables with array values correctly', () => {
@@ -283,6 +283,6 @@ describe('useVariablesFromUrl', () => {
});
const updatedVariables = result.current.getUrlVariables();
- expect(updatedVariables.multiSelectVar).toEqual(arrayValue);
+ expect(updatedVariables.multiSelectVar).toStrictEqual(arrayValue);
});
});
diff --git a/frontend/src/hooks/queryBuilder/useIsValidTag.test.ts b/frontend/src/hooks/queryBuilder/useIsValidTag.test.ts
index 47ab280e81..6797e7b34d 100644
--- a/frontend/src/hooks/queryBuilder/useIsValidTag.test.ts
+++ b/frontend/src/hooks/queryBuilder/useIsValidTag.test.ts
@@ -3,7 +3,7 @@ import { renderHook } from '@testing-library/react';
import { useIsValidTag } from './useIsValidTag';
describe('useIsValidTag', () => {
- test('returns correct validation result for SINGLE_VALUE operator type', () => {
+ it('returns correct validation result for SINGLE_VALUE operator type', () => {
const { result } = renderHook(() => useIsValidTag('SINGLE_VALUE', 1));
expect(result.current).toBe(true);
@@ -13,7 +13,7 @@ describe('useIsValidTag', () => {
expect(result2.current).toBe(false);
});
- test('returns correct validation result for MULTIPLY_VALUE operator type', () => {
+ it('returns correct validation result for MULTIPLY_VALUE operator type', () => {
const { result } = renderHook(() => useIsValidTag('MULTIPLY_VALUE', 1));
expect(result.current).toBe(true);
@@ -23,7 +23,7 @@ describe('useIsValidTag', () => {
expect(result2.current).toBe(false);
});
- test('returns correct validation result for NON_VALUE operator type', () => {
+ it('returns correct validation result for NON_VALUE operator type', () => {
const { result } = renderHook(() => useIsValidTag('NON_VALUE', 0));
expect(result.current).toBe(true);
@@ -31,7 +31,7 @@ describe('useIsValidTag', () => {
expect(result2.current).toBe(false);
});
- test('returns correct validation result for NOT_VALID operator type', () => {
+ it('returns correct validation result for NOT_VALID operator type', () => {
const { result } = renderHook(() => useIsValidTag('NOT_VALID', 1));
expect(result.current).toBe(false);
diff --git a/frontend/src/hooks/useAuthZ/useAuthZ.test.tsx b/frontend/src/hooks/useAuthZ/useAuthZ.test.tsx
index 2bacb87b8c..5d2198dd87 100644
--- a/frontend/src/hooks/useAuthZ/useAuthZ.test.tsx
+++ b/frontend/src/hooks/useAuthZ/useAuthZ.test.tsx
@@ -70,7 +70,7 @@ describe('useAuthZ', () => {
});
expect(result.current.error).toBeNull();
- expect(result.current.permissions).toEqual(expectedResponse);
+ expect(result.current.permissions).toStrictEqual(expectedResponse);
});
it('should handle API errors', async () => {
@@ -134,7 +134,7 @@ describe('useAuthZ', () => {
});
expect(requestCount).toBe(1);
- expect(result.current.permissions).toEqual({
+ expect(result.current.permissions).toStrictEqual({
[permission1]: {
isGranted: true,
},
@@ -147,7 +147,7 @@ describe('useAuthZ', () => {
});
expect(requestCount).toBe(2);
- expect(result.current.permissions).toEqual({
+ expect(result.current.permissions).toStrictEqual({
[permission1]: {
isGranted: true,
},
@@ -213,7 +213,7 @@ describe('useAuthZ', () => {
expect(result.current.isLoading).toBe(false);
expect(result.current.error).toBeNull();
- expect(result.current.permissions).toEqual({});
+ expect(result.current.permissions).toStrictEqual({});
});
it('should send correct payload format to API', async () => {
@@ -317,13 +317,13 @@ describe('useAuthZ', () => {
object: { resource: { name: 'dashboard' }, selector: '456' },
});
- expect(result1.current.permissions).toEqual({
+ expect(result1.current.permissions).toStrictEqual({
[permission1]: { isGranted: true },
});
- expect(result2.current.permissions).toEqual({
+ expect(result2.current.permissions).toStrictEqual({
[permission2]: { isGranted: false },
});
- expect(result3.current.permissions).toEqual({
+ expect(result3.current.permissions).toStrictEqual({
[permission3]: { isGranted: true },
});
});
@@ -427,7 +427,7 @@ describe('useAuthZ', () => {
expect(result.current.isLoading).toBe(false);
});
- expect(result.current.permissions).toEqual({
+ expect(result.current.permissions).toStrictEqual({
[permission1]: { isGranted: true },
[permission2]: { isGranted: false },
[permission3]: { isGranted: true },
@@ -466,7 +466,7 @@ describe('useAuthZ', () => {
);
expect(requestCount).toBe(1);
- expect(result1.current.permissions).toEqual({
+ expect(result1.current.permissions).toStrictEqual({
[permission1]: { isGranted: true },
});
@@ -484,10 +484,10 @@ describe('useAuthZ', () => {
);
expect(requestCount).toBe(2);
- expect(result1.current.permissions).toEqual({
+ expect(result1.current.permissions).toStrictEqual({
[permission1]: { isGranted: true },
});
- expect(result2.current.permissions).toEqual({
+ expect(result2.current.permissions).toStrictEqual({
[permission2]: { isGranted: false },
});
expect(result1.current.permissions).not.toHaveProperty(permission2);
diff --git a/frontend/src/hooks/useComponentPermission.test.ts b/frontend/src/hooks/useComponentPermission.test.ts
index 17fcc5b921..d513835c97 100644
--- a/frontend/src/hooks/useComponentPermission.test.ts
+++ b/frontend/src/hooks/useComponentPermission.test.ts
@@ -45,7 +45,7 @@ describe('useComponentPermission', () => {
true, // edit_widget
true, // add_panel
];
- expect(result.current).toEqual(expectedResult);
+ expect(result.current).toStrictEqual(expectedResult);
});
it('should return correct permissions for EDITOR role', () => {
@@ -70,7 +70,7 @@ describe('useComponentPermission', () => {
true, // edit_widget
true, // add_panel
];
- expect(result.current).toEqual(expectedResult);
+ expect(result.current).toStrictEqual(expectedResult);
});
it('should return correct permissions for VIEWER role', () => {
@@ -95,6 +95,6 @@ describe('useComponentPermission', () => {
false, // edit_widget
false, // add_panel
];
- expect(result.current).toEqual(expectedResult);
+ expect(result.current).toStrictEqual(expectedResult);
});
});
diff --git a/frontend/src/hooks/useGetQueryLabels.test.ts b/frontend/src/hooks/useGetQueryLabels.test.ts
index 4e2dfcb53c..17000b30ef 100644
--- a/frontend/src/hooks/useGetQueryLabels.test.ts
+++ b/frontend/src/hooks/useGetQueryLabels.test.ts
@@ -42,7 +42,7 @@ describe('useGetQueryLabels', () => {
const { result } = renderHook(() => useGetQueryLabels(query));
- expect(result.current).toEqual([]);
+ expect(result.current).toStrictEqual([]);
});
it('returns formula labels when queryFormulas is populated', () => {
@@ -60,7 +60,7 @@ describe('useGetQueryLabels', () => {
const { result } = renderHook(() => useGetQueryLabels(query));
- expect(result.current).toEqual([
+ expect(result.current).toStrictEqual([
{ label: 'F1', value: 'F1' },
{ label: 'F2', value: 'F2' },
]);
@@ -76,7 +76,7 @@ describe('useGetQueryLabels', () => {
const { result } = renderHook(() => useGetQueryLabels(query));
- expect(result.current).toEqual([]);
+ expect(result.current).toStrictEqual([]);
});
it('returns labels from clickhouse_sql when populated', () => {
@@ -90,7 +90,7 @@ describe('useGetQueryLabels', () => {
const { result } = renderHook(() => useGetQueryLabels(query));
- expect(result.current).toEqual([
+ expect(result.current).toStrictEqual([
{ label: 'query_a', value: 'query_a' },
{ label: 'query_b', value: 'query_b' },
]);
@@ -106,7 +106,7 @@ describe('useGetQueryLabels', () => {
const { result } = renderHook(() => useGetQueryLabels(query));
- expect(result.current).toEqual([]);
+ expect(result.current).toStrictEqual([]);
});
it('returns labels from promql when populated', () => {
@@ -120,7 +120,7 @@ describe('useGetQueryLabels', () => {
const { result } = renderHook(() => useGetQueryLabels(query));
- expect(result.current).toEqual([
+ expect(result.current).toStrictEqual([
{ label: 'prom_1', value: 'prom_1' },
{ label: 'prom_2', value: 'prom_2' },
]);
diff --git a/frontend/src/hooks/useInterval.test.ts b/frontend/src/hooks/useInterval.test.ts
index c6626b2224..7ab80c5ecc 100644
--- a/frontend/src/hooks/useInterval.test.ts
+++ b/frontend/src/hooks/useInterval.test.ts
@@ -5,7 +5,7 @@ import useInterval from './useInterval';
jest.useFakeTimers();
describe('useInterval', () => {
- test('calls the callback with a given delay', () => {
+ it('calls the callback with a given delay', () => {
const callback = jest.fn();
const delay = 1000;
@@ -26,7 +26,7 @@ describe('useInterval', () => {
expect(callback).toHaveBeenCalledTimes(2);
});
- test('does not call the callback if not enabled', () => {
+ it('does not call the callback if not enabled', () => {
const callback = jest.fn();
const delay = 1000;
const enabled = false;
@@ -40,7 +40,7 @@ describe('useInterval', () => {
expect(callback).toHaveBeenCalledTimes(0);
});
- test('cleans up the interval when unmounted', () => {
+ it('cleans up the interval when unmounted', () => {
const callback = jest.fn();
const delay = 1000;
@@ -61,7 +61,7 @@ describe('useInterval', () => {
expect(callback).toHaveBeenCalledTimes(1);
});
- test('updates the interval when delay changes', () => {
+ it('updates the interval when delay changes', () => {
const callback = jest.fn();
const initialDelay = 1000;
const newDelay = 2000;
diff --git a/frontend/src/hooks/usePreviousValue.test.tsx b/frontend/src/hooks/usePreviousValue.test.tsx
index efc3073af7..d3f5035abe 100644
--- a/frontend/src/hooks/usePreviousValue.test.tsx
+++ b/frontend/src/hooks/usePreviousValue.test.tsx
@@ -3,7 +3,7 @@ import { renderHook } from '@testing-library/react';
import usePreviousValue from './usePreviousValue';
describe('usePreviousValue', () => {
- test('returns the previous value of a given variable', () => {
+ it('returns the previous value of a given variable', () => {
const { result, rerender } = renderHook(
({ value }) => usePreviousValue(value),
{
@@ -23,7 +23,7 @@ describe('usePreviousValue', () => {
expect(result.current).toBe(2);
});
- test('works with different types of values', () => {
+ it('works with different types of values', () => {
const { result, rerender } = renderHook(
({ value }) => usePreviousValue(value),
{
diff --git a/frontend/src/hooks/useResourceAttribute/__tests__/whitelistedKeys.test.ts b/frontend/src/hooks/useResourceAttribute/__tests__/whitelistedKeys.test.ts
index ccb92f9b0e..6b4d90dc56 100644
--- a/frontend/src/hooks/useResourceAttribute/__tests__/whitelistedKeys.test.ts
+++ b/frontend/src/hooks/useResourceAttribute/__tests__/whitelistedKeys.test.ts
@@ -48,7 +48,7 @@ describe('useResourceAttribute config', () => {
dotNotationFilters,
);
expect(result).toHaveLength(3);
- expect(result).toEqual(dotNotationFilters);
+ expect(result).toStrictEqual(dotNotationFilters);
});
it('should keep underscore-notation filters on the Service Map route', () => {
@@ -57,21 +57,21 @@ describe('useResourceAttribute config', () => {
underscoreNotationFilters,
);
expect(result).toHaveLength(3);
- expect(result).toEqual(underscoreNotationFilters);
+ expect(result).toStrictEqual(underscoreNotationFilters);
});
it('should filter out non-whitelisted keys on the Service Map route', () => {
const allFilters = [...dotNotationFilters, ...nonWhitelistedFilters];
const result = mappingWithRoutesAndKeys(ROUTES.SERVICE_MAP, allFilters);
expect(result).toHaveLength(3);
- expect(result).toEqual(dotNotationFilters);
+ expect(result).toStrictEqual(dotNotationFilters);
});
it('should return all filters on non-Service Map routes', () => {
const allFilters = [...dotNotationFilters, ...nonWhitelistedFilters];
const result = mappingWithRoutesAndKeys('/services', allFilters);
expect(result).toHaveLength(5);
- expect(result).toEqual(allFilters);
+ expect(result).toStrictEqual(allFilters);
});
});
});
diff --git a/frontend/src/hooks/useUrlQuery.test.tsx b/frontend/src/hooks/useUrlQuery.test.tsx
index ac261580f2..f599420d29 100644
--- a/frontend/src/hooks/useUrlQuery.test.tsx
+++ b/frontend/src/hooks/useUrlQuery.test.tsx
@@ -5,7 +5,7 @@ import { createMemoryHistory } from 'history';
import useUrlQuery from './useUrlQuery';
describe('useUrlQuery', () => {
- test('returns URLSearchParams object for the current URL search', () => {
+ it('returns URLSearchParams object for the current URL search', () => {
const history = createMemoryHistory({
initialEntries: ['/test?param1=value1&param2=value2'],
});
@@ -18,7 +18,7 @@ describe('useUrlQuery', () => {
expect(result.current.get('param2')).toBe('value2');
});
- test('updates URLSearchParams object when URL search changes', () => {
+ it('updates URLSearchParams object when URL search changes', () => {
const history = createMemoryHistory({
initialEntries: ['/test?param1=value1'],
});
@@ -28,7 +28,7 @@ describe('useUrlQuery', () => {
});
expect(result.current.get('param1')).toBe('value1');
- expect(result.current.get('param2')).toBe(null);
+ expect(result.current.get('param2')).toBeNull();
act(() => {
history.push('/test?param1=newValue1&param2=value2');
@@ -40,7 +40,7 @@ describe('useUrlQuery', () => {
expect(result.current.get('param2')).toBe('value2');
});
- test('returns empty URLSearchParams object when no query parameters are present', () => {
+ it('returns empty URLSearchParams object when no query parameters are present', () => {
const history = createMemoryHistory({
initialEntries: ['/test'],
});
@@ -50,7 +50,7 @@ describe('useUrlQuery', () => {
});
expect(result.current.toString()).toBe('');
- expect(result.current.get('param1')).toBe(null);
- expect(result.current.get('param2')).toBe(null);
+ expect(result.current.get('param1')).toBeNull();
+ expect(result.current.get('param2')).toBeNull();
});
});
diff --git a/frontend/src/lib/__tests__/getStep.test.ts b/frontend/src/lib/__tests__/getStep.test.ts
index c799bfa9e0..d0a04ac35a 100644
--- a/frontend/src/lib/__tests__/getStep.test.ts
+++ b/frontend/src/lib/__tests__/getStep.test.ts
@@ -2,7 +2,7 @@ import dayjs from 'dayjs';
import getStep, { DefaultStepSize, MaxDataPoints } from 'lib/getStep';
describe('lib/getStep', () => {
- test('should return default step when the given range is less than 1 day', () => {
+ it('should return default step when the given range is less than 1 day', () => {
const start = dayjs();
const end = start.add(1, 'hour');
const startUnix = start.valueOf();
@@ -14,7 +14,7 @@ describe('lib/getStep', () => {
end: endUnix / 1e3,
inputFormat: 's',
}),
- ).toEqual(DefaultStepSize);
+ ).toStrictEqual(DefaultStepSize);
expect(
getStep({
@@ -22,7 +22,7 @@ describe('lib/getStep', () => {
end: endUnix,
inputFormat: 'ms',
}),
- ).toEqual(DefaultStepSize);
+ ).toStrictEqual(DefaultStepSize);
expect(
getStep({
@@ -30,10 +30,10 @@ describe('lib/getStep', () => {
end: endUnix * 1e6,
inputFormat: 'ns',
}),
- ).toEqual(DefaultStepSize);
+ ).toStrictEqual(DefaultStepSize);
});
- test('should return relevant step when the given range is greater than 1 day', () => {
+ it('should return relevant step when the given range is greater than 1 day', () => {
const start = dayjs();
const end = start.add(1, 'day').add(1, 'second');
const startUnix = start.valueOf();
@@ -52,7 +52,7 @@ describe('lib/getStep', () => {
end: endUnix / 1e3,
inputFormat: 's',
}),
- ).toEqual(expectedStepSize);
+ ).toStrictEqual(expectedStepSize);
expect(
getStep({
@@ -60,7 +60,7 @@ describe('lib/getStep', () => {
end: endUnix,
inputFormat: 'ms',
}),
- ).toEqual(expectedStepSize);
+ ).toStrictEqual(expectedStepSize);
expect(
getStep({
@@ -68,6 +68,6 @@ describe('lib/getStep', () => {
end: endUnix * 1e6,
inputFormat: 'ns',
}),
- ).toEqual(expectedStepSize);
+ ).toStrictEqual(expectedStepSize);
});
});
diff --git a/frontend/src/lib/__tests__/logql/parser.test.ts b/frontend/src/lib/__tests__/logql/parser.test.ts
index 56f8bcb16a..38c0b9a4fb 100644
--- a/frontend/src/lib/__tests__/logql/parser.test.ts
+++ b/frontend/src/lib/__tests__/logql/parser.test.ts
@@ -2,9 +2,9 @@ import { logqlQueries } from 'lib/__fixtures__/logql';
import parser from 'lib/logql/parser';
describe('lib/logql/parser', () => {
- test('parse valid queries', () => {
+ it('parse valid queries', () => {
logqlQueries.forEach((queryObject) => {
- expect(parser(queryObject.query)).toEqual(queryObject.parsedQuery);
+ expect(parser(queryObject.query)).toStrictEqual(queryObject.parsedQuery);
});
});
});
diff --git a/frontend/src/lib/__tests__/logql/reverseParser.test.ts b/frontend/src/lib/__tests__/logql/reverseParser.test.ts
index 1d5d8a6145..69e6a52603 100644
--- a/frontend/src/lib/__tests__/logql/reverseParser.test.ts
+++ b/frontend/src/lib/__tests__/logql/reverseParser.test.ts
@@ -2,9 +2,11 @@ import { logqlQueries } from 'lib/__fixtures__/logql';
import { reverseParser } from 'lib/logql/reverseParser';
describe('lib/logql/reverseParser', () => {
- test('reverse parse valid queries', () => {
+ it('reverse parse valid queries', () => {
logqlQueries.forEach((queryObject) => {
- expect(reverseParser(queryObject.parsedQuery)).toEqual(queryObject.query);
+ expect(reverseParser(queryObject.parsedQuery)).toStrictEqual(
+ queryObject.query,
+ );
});
});
});
diff --git a/frontend/src/lib/__tests__/logql/splitter.test.ts b/frontend/src/lib/__tests__/logql/splitter.test.ts
index 4a9e2b4684..13900056f9 100644
--- a/frontend/src/lib/__tests__/logql/splitter.test.ts
+++ b/frontend/src/lib/__tests__/logql/splitter.test.ts
@@ -2,9 +2,9 @@ import { logqlQueries } from 'lib/__fixtures__/logql';
import { splitter } from 'lib/logql/splitter';
describe('lib/logql/splitter', () => {
- test('splitter valid quereies', () => {
+ it('splitter valid quereies', () => {
logqlQueries.forEach((queryObject) => {
- expect(splitter(queryObject.query)).toEqual(queryObject.splitterQuery);
+ expect(splitter(queryObject.query)).toStrictEqual(queryObject.splitterQuery);
});
});
});
diff --git a/frontend/src/lib/dashboardVariables/variableReference.test.ts b/frontend/src/lib/dashboardVariables/variableReference.test.ts
index 5a75b3ed51..6cd6339dd1 100644
--- a/frontend/src/lib/dashboardVariables/variableReference.test.ts
+++ b/frontend/src/lib/dashboardVariables/variableReference.test.ts
@@ -112,7 +112,7 @@ const baseQuery: Query = {
describe('extractQueryTextStrings', () => {
it('returns empty array for query builder with no data', () => {
- expect(extractQueryTextStrings(baseQuery)).toEqual([]);
+ expect(extractQueryTextStrings(baseQuery)).toStrictEqual([]);
});
it('extracts string values from query builder filter items', () => {
@@ -137,7 +137,7 @@ describe('extractQueryTextStrings', () => {
};
const texts = extractQueryTextStrings(query);
- expect(texts).toEqual(['$service_name', 'hardcoded', '$env']);
+ expect(texts).toStrictEqual(['$service_name', 'hardcoded', '$env']);
});
it('extracts filter expression from query builder', () => {
@@ -157,7 +157,7 @@ describe('extractQueryTextStrings', () => {
};
const texts = extractQueryTextStrings(query);
- expect(texts).toEqual(['env = $deployment_environment']);
+ expect(texts).toStrictEqual(['env = $deployment_environment']);
});
it('skips non-string filter values', () => {
@@ -178,7 +178,7 @@ describe('extractQueryTextStrings', () => {
},
};
- expect(extractQueryTextStrings(query)).toEqual([]);
+ expect(extractQueryTextStrings(query)).toStrictEqual([]);
});
it('extracts promql query strings', () => {
@@ -191,7 +191,7 @@ describe('extractQueryTextStrings', () => {
],
};
- expect(extractQueryTextStrings(query)).toEqual([
+ expect(extractQueryTextStrings(query)).toStrictEqual([
'up{env="$env"}',
'cpu{ns="$namespace"}',
]);
@@ -211,7 +211,7 @@ describe('extractQueryTextStrings', () => {
],
};
- expect(extractQueryTextStrings(query)).toEqual([
+ expect(extractQueryTextStrings(query)).toStrictEqual([
'SELECT * WHERE env = {{.env}}',
]);
});
@@ -240,7 +240,10 @@ describe('extractQueryTextStrings', () => {
},
};
- expect(extractQueryTextStrings(query)).toEqual(['$env', '$service_name']);
+ expect(extractQueryTextStrings(query)).toStrictEqual([
+ '$env',
+ '$service_name',
+ ]);
});
it('collects both filter items and filter expression from the same queryData', () => {
@@ -262,7 +265,7 @@ describe('extractQueryTextStrings', () => {
},
};
- expect(extractQueryTextStrings(query)).toEqual([
+ expect(extractQueryTextStrings(query)).toStrictEqual([
'$service_name',
'env = $deployment_environment',
]);
@@ -278,7 +281,7 @@ describe('extractQueryTextStrings', () => {
],
};
- expect(extractQueryTextStrings(query)).toEqual(['up{env="$env"}']);
+ expect(extractQueryTextStrings(query)).toStrictEqual(['up{env="$env"}']);
});
it('skips clickhouse entries with empty query strings', () => {
@@ -296,7 +299,7 @@ describe('extractQueryTextStrings', () => {
],
};
- expect(extractQueryTextStrings(query)).toEqual([
+ expect(extractQueryTextStrings(query)).toStrictEqual([
'SELECT * WHERE x = {{.env}}',
]);
});
@@ -306,7 +309,7 @@ describe('extractQueryTextStrings', () => {
...baseQuery,
queryType: 'unknown' as unknown as EQueryType,
};
- expect(extractQueryTextStrings(query)).toEqual([]);
+ expect(extractQueryTextStrings(query)).toStrictEqual([]);
});
});
@@ -319,7 +322,9 @@ describe('getVariableReferencesInQuery', () => {
];
it('returns empty array when query has no text', () => {
- expect(getVariableReferencesInQuery(baseQuery, variableNames)).toEqual([]);
+ expect(getVariableReferencesInQuery(baseQuery, variableNames)).toStrictEqual(
+ [],
+ );
});
it('detects variables referenced in query builder filters', () => {
@@ -344,7 +349,7 @@ describe('getVariableReferencesInQuery', () => {
};
const result = getVariableReferencesInQuery(query, variableNames);
- expect(result).toEqual(['deployment_environment', 'service_name']);
+ expect(result).toStrictEqual(['deployment_environment', 'service_name']);
});
it('detects variables in promql queries', () => {
@@ -363,7 +368,7 @@ describe('getVariableReferencesInQuery', () => {
};
const result = getVariableReferencesInQuery(query, variableNames);
- expect(result).toEqual(['deployment_environment', 'endpoint']);
+ expect(result).toStrictEqual(['deployment_environment', 'endpoint']);
});
it('detects variables in clickhouse sql queries', () => {
@@ -381,7 +386,7 @@ describe('getVariableReferencesInQuery', () => {
};
const result = getVariableReferencesInQuery(query, variableNames);
- expect(result).toEqual(['service_name']);
+ expect(result).toStrictEqual(['service_name']);
});
it('detects variables spread across multiple queryData entries', () => {
@@ -406,7 +411,7 @@ describe('getVariableReferencesInQuery', () => {
};
const result = getVariableReferencesInQuery(query, variableNames);
- expect(result).toEqual(['deployment_environment', 'service_name']);
+ expect(result).toStrictEqual(['deployment_environment', 'service_name']);
});
it('returns empty array when no variables are referenced', () => {
@@ -423,7 +428,7 @@ describe('getVariableReferencesInQuery', () => {
],
};
- expect(getVariableReferencesInQuery(query, variableNames)).toEqual([]);
+ expect(getVariableReferencesInQuery(query, variableNames)).toStrictEqual([]);
});
it('returns empty array when variableNames list is empty', () => {
@@ -440,6 +445,6 @@ describe('getVariableReferencesInQuery', () => {
],
};
- expect(getVariableReferencesInQuery(query, [])).toEqual([]);
+ expect(getVariableReferencesInQuery(query, [])).toStrictEqual([]);
});
});
diff --git a/frontend/src/lib/getRandomColor.test.ts b/frontend/src/lib/getRandomColor.test.ts
index 906ac95f06..07226ea7e6 100644
--- a/frontend/src/lib/getRandomColor.test.ts
+++ b/frontend/src/lib/getRandomColor.test.ts
@@ -5,7 +5,7 @@ import spans from './__fixtures__/getRandomColor';
import { colors, spanServiceNameToColorMapping } from './getRandomColor';
describe('spanServiceNameToColorMapping', () => {
- test('should map span services to colors', () => {
+ it('should map span services to colors', () => {
const expectedServiceToColorMap = {
serviceA: themeColors.chartcolors.turquoise,
serviceB: themeColors.chartcolors.turquoise,
@@ -14,16 +14,16 @@ describe('spanServiceNameToColorMapping', () => {
const result = spanServiceNameToColorMapping(spans);
- expect(result).toEqual(expectedServiceToColorMap);
+ expect(result).toStrictEqual(expectedServiceToColorMap);
});
- test('should return an empty object when input is an empty array', () => {
+ it('should return an empty object when input is an empty array', () => {
const spans: Span[] = [];
const expectedServiceToColorMap = {};
const result = spanServiceNameToColorMapping(spans);
- expect(result).toEqual(expectedServiceToColorMap);
+ expect(result).toStrictEqual(expectedServiceToColorMap);
});
});
diff --git a/frontend/src/lib/getStep.test.ts b/frontend/src/lib/getStep.test.ts
index a70057245f..5f5401e511 100644
--- a/frontend/src/lib/getStep.test.ts
+++ b/frontend/src/lib/getStep.test.ts
@@ -3,7 +3,7 @@ import dayjs from 'dayjs';
import getStep, { DefaultStepSize, MaxDataPoints } from './getStep';
describe('get dynamic step size', () => {
- test('should return default step size if diffSec is less than MaxDataPoints', () => {
+ it('should return default step size if diffSec is less than MaxDataPoints', () => {
const start = dayjs().subtract(1, 'minute').valueOf();
const end = dayjs().valueOf();
@@ -16,7 +16,7 @@ describe('get dynamic step size', () => {
expect(step).toBe(DefaultStepSize);
});
- test('should return appropriate step size if diffSec is more than MaxDataPoints', () => {
+ it('should return appropriate step size if diffSec is more than MaxDataPoints', () => {
const start = dayjs().subtract(4, 'hour').valueOf();
const end = dayjs().valueOf();
@@ -36,7 +36,7 @@ describe('get dynamic step size', () => {
expect(step).toBe(expectedStep);
});
- test('should correctly handle different input formats', () => {
+ it('should correctly handle different input formats', () => {
const endSec = dayjs().unix();
const startSec = endSec - 4 * 3600; // 4 hours earlier
@@ -66,7 +66,7 @@ describe('get dynamic step size', () => {
expect(stepNs).toBe(expectedStep); // Expect the same result as 's' inputFormat
});
- test('should throw an error for invalid input format', () => {
+ it('should throw an error for invalid input format', () => {
const start = dayjs().valueOf();
const end = dayjs().valueOf();
@@ -79,7 +79,7 @@ describe('get dynamic step size', () => {
}).toThrow('invalid format');
});
- test('should return DefaultStepSize when start and end are the same', () => {
+ it('should return DefaultStepSize when start and end are the same', () => {
const start = dayjs().valueOf();
const end = start; // same as start
@@ -92,7 +92,7 @@ describe('get dynamic step size', () => {
expect(step).toBe(DefaultStepSize);
});
- test('should return DefaultStepSize if diffSec is exactly MaxDataPoints', () => {
+ it('should return DefaultStepSize if diffSec is exactly MaxDataPoints', () => {
const endMs = dayjs().valueOf();
const startMs = endMs - MaxDataPoints * 1000; // exactly MaxDataPoints seconds earlier
@@ -105,7 +105,7 @@ describe('get dynamic step size', () => {
expect(step).toBe(DefaultStepSize); // since calculated step size is less than DefaultStepSize, it should return DefaultStepSize
});
- test('should return DefaultStepSize for future dates less than (MaxDataPoints * DefaultStepSize) seconds ahead', () => {
+ it('should return DefaultStepSize for future dates less than (MaxDataPoints * DefaultStepSize) seconds ahead', () => {
const start = dayjs().valueOf();
const end = start + MaxDataPoints * DefaultStepSize * 1000 - 1; // just one millisecond less than (MaxDataPoints * DefaultStepSize) seconds ahead
@@ -118,7 +118,7 @@ describe('get dynamic step size', () => {
expect(step).toBe(DefaultStepSize);
});
- test('should handle string inputs correctly for a time range greater than (MaxDataPoints * DefaultStepSize) seconds', () => {
+ it('should handle string inputs correctly for a time range greater than (MaxDataPoints * DefaultStepSize) seconds', () => {
const endMs = dayjs().valueOf();
const startMs = endMs - (MaxDataPoints * DefaultStepSize * 1000 + 1); // one millisecond more than (MaxDataPoints * DefaultStepSize) seconds earlier
diff --git a/frontend/src/lib/newQueryBuilder/__test__/chooseAutocompleteFromCustomValue.test.ts b/frontend/src/lib/newQueryBuilder/__test__/chooseAutocompleteFromCustomValue.test.ts
index aa6bc0388d..9a911b5c35 100644
--- a/frontend/src/lib/newQueryBuilder/__test__/chooseAutocompleteFromCustomValue.test.ts
+++ b/frontend/src/lib/newQueryBuilder/__test__/chooseAutocompleteFromCustomValue.test.ts
@@ -37,16 +37,16 @@ describe('chooseAutocompleteFromCustomValue', () => {
const r1 = chooseAutocompleteFromCustomValue([], 'region', 'number');
const r2 = chooseAutocompleteFromCustomValue([], 'region', 'number');
expect(r1.id).toBeTruthy();
- expect(r1.id).not.toEqual('----');
- expect(r1.id).toEqual(r2.id);
- expect(r1.key).toEqual('region');
+ expect(r1.id).not.toBe('----');
+ expect(r1.id).toStrictEqual(r2.id);
+ expect(r1.key).toBe('region');
// "number" maps to Float64 in our normalization
- expect(r1.dataType).toEqual(DataTypes.Float64);
+ expect(r1.dataType).toStrictEqual(DataTypes.Float64);
});
it('normalizes "number" to Float64', () => {
const res = chooseAutocompleteFromCustomValue([], 'latency', 'number');
- expect(res.dataType).toEqual(DataTypes.Float64);
+ expect(res.dataType).toStrictEqual(DataTypes.Float64);
});
it('same key but different dataType returns new object with computed id', () => {
@@ -60,7 +60,7 @@ describe('chooseAutocompleteFromCustomValue', () => {
{ key: 'service.name', dataType: DataTypes.Float64, type: '' },
baseAutoCompleteIdKeysOrder,
);
- expect(res).toEqual(
+ expect(res).toStrictEqual(
expect.objectContaining({
key: 'service.name',
dataType: DataTypes.Float64,
@@ -80,7 +80,7 @@ describe('chooseAutocompleteFromCustomValue', () => {
{ key: 'unknown_key', dataType: 'unknown' as any, type: '' },
baseAutoCompleteIdKeysOrder,
);
- expect(res).toEqual(
+ expect(res).toStrictEqual(
expect.objectContaining({
key: 'unknown_key',
dataType: 'unknown',
@@ -96,7 +96,7 @@ describe('chooseAutocompleteFromCustomValue', () => {
{ key: 'undef_key', dataType: DataTypes.EMPTY, type: '' },
baseAutoCompleteIdKeysOrder,
);
- expect(res).toEqual(
+ expect(res).toStrictEqual(
expect.objectContaining({
key: 'undef_key',
dataType: DataTypes.EMPTY,
@@ -108,6 +108,6 @@ describe('chooseAutocompleteFromCustomValue', () => {
it('uses empty string as default type when fieldType is not provided', () => {
const res = chooseAutocompleteFromCustomValue([], 'env', DataTypes.String);
- expect(res.type).toEqual('');
+ expect(res.type).toBe('');
});
});
diff --git a/frontend/src/lib/uPlotLib/plugins/onClickPlugin.ts b/frontend/src/lib/uPlotLib/plugins/onClickPlugin.ts
index 64214ed9a3..9d60256a31 100644
--- a/frontend/src/lib/uPlotLib/plugins/onClickPlugin.ts
+++ b/frontend/src/lib/uPlotLib/plugins/onClickPlugin.ts
@@ -37,7 +37,7 @@ function getPreferredSeriesIndex(
const top = e.clientY - bbox.top;
// Prefer series explicitly marked as focused
for (let i = 1; i < u.series.length; i++) {
- // @ts-ignore
+ // @ts-expect-error
const isSeriesFocused = u.series[i]?._focus === true;
const isSeriesShown = u.series[i].show !== false;
const seriesValue = u.data[i]?.[timestampIndex];
diff --git a/frontend/src/lib/uPlotLib/plugins/tooltipPlugin.ts b/frontend/src/lib/uPlotLib/plugins/tooltipPlugin.ts
index 33d175ad84..196d51bef3 100644
--- a/frontend/src/lib/uPlotLib/plugins/tooltipPlugin.ts
+++ b/frontend/src/lib/uPlotLib/plugins/tooltipPlugin.ts
@@ -182,7 +182,7 @@ const generateTooltipContent = (
show: item.show || false,
color,
label,
- // @ts-ignore
+ // @ts-expect-error
focus: item?._focus || false,
value,
tooltipValue,
diff --git a/frontend/src/lib/uPlotLib/utils/getYAxisScale.test.ts b/frontend/src/lib/uPlotLib/utils/getYAxisScale.test.ts
index b333759a5f..f9bd8748d2 100644
--- a/frontend/src/lib/uPlotLib/utils/getYAxisScale.test.ts
+++ b/frontend/src/lib/uPlotLib/utils/getYAxisScale.test.ts
@@ -58,7 +58,7 @@ describe('getYAxisScale', () => {
softMax: null,
} as GetYAxisScale);
- expect(result).toEqual({ auto: true });
+ expect(result).toStrictEqual({ auto: true });
});
it('Threshold absent, series data present softmin and softmax present', () => {
@@ -70,7 +70,7 @@ describe('getYAxisScale', () => {
softMax: mockSoftMax,
} as GetYAxisScale);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
auto: false,
range: [5, 30],
});
@@ -85,7 +85,7 @@ describe('getYAxisScale', () => {
softMax: null,
} as GetYAxisScale);
- expect(result).toEqual({ auto: true });
+ expect(result).toStrictEqual({ auto: true });
});
it('Threshold absent, series data present, softmin present and softmax absent', () => {
@@ -97,7 +97,7 @@ describe('getYAxisScale', () => {
softMax: null,
} as GetYAxisScale);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
auto: false,
range: [5, 25],
});
@@ -112,7 +112,7 @@ describe('getYAxisScale', () => {
softMax: mockSoftMax,
} as GetYAxisScale);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
auto: false,
range: [15, 30],
});
@@ -127,7 +127,7 @@ describe('getYAxisScale', () => {
softMax: mockSoftMax,
} as GetYAxisScale);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
auto: false,
range: [5, 30],
});
@@ -142,7 +142,7 @@ describe('getYAxisScale', () => {
softMax: null,
} as GetYAxisScale);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
auto: false,
range: [10, 20],
});
@@ -157,7 +157,7 @@ describe('getYAxisScale', () => {
softMax: mockSoftMax,
} as GetYAxisScale);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
auto: false,
range: [10, 30],
});
@@ -172,7 +172,7 @@ describe('getYAxisScale', () => {
softMax: null,
} as GetYAxisScale);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
auto: false,
range: [5, 20],
});
@@ -187,7 +187,7 @@ describe('getYAxisScale', () => {
softMax: mockSoftMax,
} as GetYAxisScale);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
range: {
min: { soft: mockSoftMin, mode: 2 },
max: { soft: mockSoftMax, mode: 2 },
@@ -204,7 +204,7 @@ describe('getYAxisScale', () => {
softMax: mockSoftMax,
} as GetYAxisScale);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
auto: false,
range: [5, 30],
});
diff --git a/frontend/src/lib/uPlotLib/utils/tests/getSeriesData.test.ts b/frontend/src/lib/uPlotLib/utils/tests/getSeriesData.test.ts
index b63bbb62c5..4da35ba3f5 100644
--- a/frontend/src/lib/uPlotLib/utils/tests/getSeriesData.test.ts
+++ b/frontend/src/lib/uPlotLib/utils/tests/getSeriesData.test.ts
@@ -8,24 +8,24 @@ import {
jest.mock('../getRenderer', () => jest.fn().mockImplementation(() => () => {}));
describe('Get Series Data', () => {
- test('Should return series data for uplot chart', () => {
+ it('Should return series data for uplot chart', () => {
const seriesData = getSeries(seriesBarChartData);
- expect(seriesData.length).toBe(5);
+ expect(seriesData).toHaveLength(5);
expect(seriesData[1].label).toBe('firstLegend');
expect(seriesData[1].show).toBe(true);
expect(seriesData[1].fill).toBe('#FF6F91');
expect(seriesData[1].width).toBe(2);
});
- test('Should return series drawline bar chart for panel type barchart', () => {
+ it('Should return series drawline bar chart for panel type barchart', () => {
const seriesData = getSeries(seriesBarChartData);
- // @ts-ignore
+ // @ts-expect-error
expect(seriesData[1].drawStyle).toBe('bars');
});
- test('Should return seris drawline line chart for panel type time series', () => {
+ it('Should return seris drawline line chart for panel type time series', () => {
const seriesData = getSeries(seriesLineChartData);
- // @ts-ignore
+ // @ts-expect-error
expect(seriesData[1].drawStyle).toBe('line');
});
diff --git a/frontend/src/lib/uPlotLib/utils/tests/getUplotChartOptions.test.ts b/frontend/src/lib/uPlotLib/utils/tests/getUplotChartOptions.test.ts
index b1e7a0140e..3d00d0e5a8 100644
--- a/frontend/src/lib/uPlotLib/utils/tests/getUplotChartOptions.test.ts
+++ b/frontend/src/lib/uPlotLib/utils/tests/getUplotChartOptions.test.ts
@@ -20,7 +20,7 @@ jest.mock('../getSeriesData', () =>
);
describe('getUPlotChartOptions', () => {
- test('should return uPlot options', () => {
+ it('should return uPlot options', () => {
const options = getUPlotChartOptions(inputPropsTimeSeries);
expect(options.legend?.isolate).toBe(true);
expect(options.width).toBe(inputPropsTimeSeries.dimensions.width);
@@ -28,7 +28,7 @@ describe('getUPlotChartOptions', () => {
expect(options.series[1].label).toBe('A');
});
- test('should return enhanced legend options when enabled', () => {
+ it('should return enhanced legend options when enabled', () => {
const options = getUPlotChartOptions({
...inputPropsTimeSeries,
enhancedLegend: true,
@@ -40,7 +40,7 @@ describe('getUPlotChartOptions', () => {
expect(Array.isArray(options.hooks?.ready)).toBe(true);
});
- test('should adjust chart dimensions for right legend position', () => {
+ it('should adjust chart dimensions for right legend position', () => {
const options = getUPlotChartOptions({
...inputPropsTimeSeries,
enhancedLegend: true,
@@ -51,7 +51,7 @@ describe('getUPlotChartOptions', () => {
expect(options.height).toBe(inputPropsTimeSeries.dimensions.height);
});
- test('should adjust chart dimensions for bottom legend position', () => {
+ it('should adjust chart dimensions for bottom legend position', () => {
const options = getUPlotChartOptions({
...inputPropsTimeSeries,
enhancedLegend: true,
@@ -62,39 +62,35 @@ describe('getUPlotChartOptions', () => {
expect(options.height).toBeLessThan(inputPropsTimeSeries.dimensions.height);
});
- test('Should return line chart as drawStyle for time series', () => {
+ it('Should return line chart as drawStyle for time series', () => {
const options = getUPlotChartOptions(inputPropsTimeSeries);
- // @ts-ignore
+ // @ts-expect-error
expect(options.series[1].drawStyle).toBe('line');
- // @ts-ignore
+ // @ts-expect-error
expect(options.series[1].lineInterpolation).toBe('spline');
- // @ts-ignore
expect(options.series[1].show).toBe(true);
expect(options.series[1].label).toBe('A');
expect(options.series[1].stroke).toBe('#6495ED');
expect(options.series[1].width).toBe(2);
expect(options.series[1].spanGaps).toBe(true);
- // @ts-ignore
- expect(options.series[1].points.size).toBe(5);
+ expect(options.series[1].points?.size).toBe(5);
});
- test('should return bar chart as drawStyle for panel type bar', () => {
+ it('should return bar chart as drawStyle for panel type bar', () => {
const options = getUPlotChartOptions({
...inputPropsTimeSeries,
panelType: PANEL_TYPES.BAR,
});
- // @ts-ignore
+ // @ts-expect-error
expect(options.series[1].drawStyle).toBe('bars');
- // @ts-ignore
- expect(options.series[1].lineInterpolation).toBe(null);
- // @ts-ignore
+ // @ts-expect-error
+ expect(options.series[1].lineInterpolation).toBeNull();
expect(options.series[1].show).toBe(true);
expect(options.series[1].label).toBe('A');
expect(options.series[1].fill).toBe('#6495ED40');
expect(options.series[1].stroke).toBe('#6495ED');
expect(options.series[1].width).toBe(2);
expect(options.series[1].spanGaps).toBe(true);
- // @ts-ignore
- expect(options.series[1].points.size).toBe(5);
+ expect(options.series[1].points?.size).toBe(5);
});
});
diff --git a/frontend/src/lib/uPlotV2/components/Tooltip/__tests__/utils.test.ts b/frontend/src/lib/uPlotV2/components/Tooltip/__tests__/utils.test.ts
index df284bb8bf..866ae5b909 100644
--- a/frontend/src/lib/uPlotV2/components/Tooltip/__tests__/utils.test.ts
+++ b/frontend/src/lib/uPlotV2/components/Tooltip/__tests__/utils.test.ts
@@ -297,7 +297,7 @@ describe('Tooltip utils', () => {
decimalPrecision,
});
- expect(result.map((item) => item.value)).toEqual([3, 1, 4, 2]);
+ expect(result.map((item) => item.value)).toStrictEqual([3, 1, 4, 2]);
});
});
});
diff --git a/frontend/src/lib/uPlotV2/components/__tests__/UPlotChart.test.tsx b/frontend/src/lib/uPlotV2/components/__tests__/UPlotChart.test.tsx
index a760c92f1d..8cd167995f 100644
--- a/frontend/src/lib/uPlotV2/components/__tests__/UPlotChart.test.tsx
+++ b/frontend/src/lib/uPlotV2/components/__tests__/UPlotChart.test.tsx
@@ -220,8 +220,8 @@ describe('UPlotChart', () => {
const [opts] = mockUPlotConstructor.mock.calls[0];
expect(opts.width).toBe(500);
expect(opts.height).toBe(300);
- expect(opts.axes).toEqual([{ scale: 'y' }]);
- expect(opts.cursor).toEqual({ show: true });
+ expect(opts.axes).toStrictEqual([{ scale: 'y' }]);
+ expect(opts.cursor).toStrictEqual({ show: true });
});
it('skips creation when width or height is 0', () => {
@@ -346,8 +346,8 @@ describe('UPlotChart', () => {
});
const [, receivedData] = mockUPlotConstructor.mock.calls[0];
- expect(receivedData[0]).toEqual([0, 50, 100]);
- expect(receivedData[1]).toEqual([1, null, 2]);
+ expect(receivedData[0]).toStrictEqual([0, 50, 100]);
+ expect(receivedData[1]).toStrictEqual([1, null, 2]);
});
it('passes data through unchanged when no gap exceeds the numeric threshold', () => {
@@ -396,8 +396,8 @@ describe('UPlotChart', () => {
);
const receivedData = instances[0].setData.mock.calls[0][0];
- expect(receivedData[0]).toEqual([0, 50, 100]);
- expect(receivedData[1]).toEqual([3, null, 4]);
+ expect(receivedData[0]).toStrictEqual([0, 50, 100]);
+ expect(receivedData[1]).toStrictEqual([3, null, 4]);
});
});
diff --git a/frontend/src/lib/uPlotV2/config/__tests__/UPlotAxisBuilder.test.ts b/frontend/src/lib/uPlotV2/config/__tests__/UPlotAxisBuilder.test.ts
index 128506dc55..8f2b136821 100644
--- a/frontend/src/lib/uPlotV2/config/__tests__/UPlotAxisBuilder.test.ts
+++ b/frontend/src/lib/uPlotV2/config/__tests__/UPlotAxisBuilder.test.ts
@@ -40,12 +40,12 @@ describe('UPlotAxisBuilder', () => {
expect(config.gap).toBe(5);
// Default grid and ticks are created
- expect(config.grid).toEqual({
+ expect(config.grid).toStrictEqual({
stroke: 'rgba(0,0,0,0.5)',
width: 0.2,
show: true,
});
- expect(config.ticks).toEqual({
+ expect(config.ticks).toStrictEqual({
width: 0.3,
show: true,
});
@@ -81,18 +81,18 @@ describe('UPlotAxisBuilder', () => {
expect(config.label).toBe('Time');
expect(config.show).toBe(false);
expect(config.gap).toBe(10);
- expect(config.grid).toEqual({
+ expect(config.grid).toStrictEqual({
stroke: '#ff0000',
width: 1,
show: false,
});
- expect(config.ticks).toEqual({
+ expect(config.ticks).toStrictEqual({
stroke: '#00ff00',
width: 1,
show: false,
size: 10,
});
- expect(config.values).toEqual(['1', '2', '3']);
+ expect(config.values).toStrictEqual(['1', '2', '3']);
expect(config.space).toBe(20);
expect(config.size).toBe(100);
expect(config.stroke).toBe('#0000ff');
@@ -111,7 +111,7 @@ describe('UPlotAxisBuilder', () => {
const config = builder.getConfig();
- expect(config.grid).toEqual({
+ expect(config.grid).toStrictEqual({
// stroke falls back to theme-based default when not provided
stroke: 'rgba(231,233,237,0.3)',
// provided width overrides default
@@ -131,7 +131,7 @@ describe('UPlotAxisBuilder', () => {
const withoutTicks = new UPlotAxisBuilder(createAxisProps());
expect(withTicks.getConfig().ticks).toBe(customTicks);
- expect(withoutTicks.getConfig().ticks).toEqual({
+ expect(withoutTicks.getConfig().ticks).toStrictEqual({
width: 0.3,
show: true,
});
@@ -192,7 +192,12 @@ describe('UPlotAxisBuilder', () => {
expect(getToolTipValue).toHaveBeenNthCalledWith(2, '2', 'ms', 3);
// Null/NaN values should map to empty strings
- expect(result).toEqual(['formatted:1:ms:3', '', 'formatted:2:ms:3', '']);
+ expect(result).toStrictEqual([
+ 'formatted:1:ms:3',
+ '',
+ 'formatted:2:ms:3',
+ '',
+ ]);
});
it('adds dynamic size calculator only for Y-axis when size is not provided', () => {
diff --git a/frontend/src/lib/uPlotV2/config/__tests__/UPlotConfigBuilder.test.ts b/frontend/src/lib/uPlotV2/config/__tests__/UPlotConfigBuilder.test.ts
index a9bd90e051..99171e47d4 100644
--- a/frontend/src/lib/uPlotV2/config/__tests__/UPlotConfigBuilder.test.ts
+++ b/frontend/src/lib/uPlotV2/config/__tests__/UPlotConfigBuilder.test.ts
@@ -75,7 +75,7 @@ describe('UPlotConfigBuilder', () => {
const config = builder.getConfig();
const setSelectHooks = config.hooks?.setSelect ?? [];
- expect(setSelectHooks.length).toBe(1);
+ expect(setSelectHooks).toHaveLength(1);
const uplotInstance = {
select: { left: 10, width: 0 },
@@ -96,7 +96,7 @@ describe('UPlotConfigBuilder', () => {
const config = builder.getConfig();
const setSelectHooks = config.hooks?.setSelect ?? [];
- expect(setSelectHooks.length).toBe(1);
+ expect(setSelectHooks).toHaveLength(1);
const posToVal = jest
.fn()
@@ -164,7 +164,7 @@ describe('UPlotConfigBuilder', () => {
// Legend items align with series and carry label and color from series config
const legendItems = builder.getLegendItems();
- expect(Object.keys(legendItems)).toEqual(['1', '2']);
+ expect(Object.keys(legendItems)).toStrictEqual(['1', '2']);
expect(legendItems[1].seriesIndex).toBe(1);
expect(legendItems[1].label).toBe('Requests');
expect(legendItems[2].label).toBe('Errors');
@@ -194,7 +194,7 @@ describe('UPlotConfigBuilder', () => {
// Only one scale entry for 'y' (merge path used, no duplicate added)
expect(config.scales).toBeDefined();
const scales = config.scales ?? {};
- expect(Object.keys(scales)).toEqual(['y']);
+ expect(Object.keys(scales)).toStrictEqual(['y']);
expect(scales.y?.range).toBeDefined();
});
@@ -359,7 +359,7 @@ describe('UPlotConfigBuilder', () => {
const drawHooks = config.hooks?.draw ?? [];
// Only a single draw hook should be registered for the same scaleKey
- expect(drawHooks.length).toBe(1);
+ expect(drawHooks).toHaveLength(1);
});
it('adds multiple thresholds when scale key is different', () => {
@@ -380,7 +380,7 @@ describe('UPlotConfigBuilder', () => {
const drawHooks = config.hooks?.draw ?? [];
// Two draw hooks should be registered for different scaleKeys
- expect(drawHooks.length).toBe(2);
+ expect(drawHooks).toHaveLength(2);
});
it('merges cursor configuration with defaults instead of replacing them', () => {
@@ -472,11 +472,11 @@ describe('UPlotConfigBuilder', () => {
const config = builder.getConfig();
- expect(config.bands).toEqual(bands);
- expect(config.padding).toEqual([10, 20, 30, 40]);
- expect(config.legend).toEqual({ show: true, live: true });
- expect(config.focus).toEqual({ alpha: 0.5 });
- expect(config.select).toEqual({ left: 0, width: 0, top: 0, height: 0 });
+ expect(config.bands).toStrictEqual(bands);
+ expect(config.padding).toStrictEqual([10, 20, 30, 40]);
+ expect(config.legend).toStrictEqual({ show: true, live: true });
+ expect(config.focus).toStrictEqual({ alpha: 0.5 });
+ expect(config.select).toStrictEqual({ left: 0, width: 0, top: 0, height: 0 });
expect(config.tzDate).toBe(tzDate);
});
diff --git a/frontend/src/lib/uPlotV2/config/__tests__/UPlotScaleBuilder.test.ts b/frontend/src/lib/uPlotV2/config/__tests__/UPlotScaleBuilder.test.ts
index 9b3f3b2cb7..c24d69c655 100644
--- a/frontend/src/lib/uPlotV2/config/__tests__/UPlotScaleBuilder.test.ts
+++ b/frontend/src/lib/uPlotV2/config/__tests__/UPlotScaleBuilder.test.ts
@@ -224,12 +224,12 @@ describe('UPlotScaleBuilder', () => {
});
expect(builder.props.min).toBe(2);
- expect(builder.props.softMax).toBe(undefined);
+ expect(builder.props.softMax).toBeUndefined();
expect(builder.props.max).toBe(10);
expect(builder.props.softMin).toBe(1);
expect(builder.props.time).toBe(false);
expect(builder.props.scaleKey).toBe('y');
expect(builder.props.distribution).toBe(DistributionType.Linear);
- expect(builder.props.thresholds).toBe(undefined);
+ expect(builder.props.thresholds).toBeUndefined();
});
});
diff --git a/frontend/src/lib/uPlotV2/config/__tests__/UPlotSeriesBuilder.test.ts b/frontend/src/lib/uPlotV2/config/__tests__/UPlotSeriesBuilder.test.ts
index f4abf512ac..1a7fa7bdfe 100644
--- a/frontend/src/lib/uPlotV2/config/__tests__/UPlotSeriesBuilder.test.ts
+++ b/frontend/src/lib/uPlotV2/config/__tests__/UPlotSeriesBuilder.test.ts
@@ -226,7 +226,7 @@ describe('UPlotSeriesBuilder', () => {
const config = builder.getConfig();
- expect(config.dash).toEqual([10, 10]);
+ expect(config.dash).toStrictEqual([10, 10]);
expect(config.cap).toBe('round');
});
diff --git a/frontend/src/lib/uPlotV2/context/__tests__/PlotContext.test.tsx b/frontend/src/lib/uPlotV2/context/__tests__/PlotContext.test.tsx
index c35a07498c..7ff5bdb2e5 100644
--- a/frontend/src/lib/uPlotV2/context/__tests__/PlotContext.test.tsx
+++ b/frontend/src/lib/uPlotV2/context/__tests__/PlotContext.test.tsx
@@ -204,7 +204,7 @@ describe('PlotContext', () => {
const setSeries = (plot.setSeries as jest.Mock).mock.calls;
// index 0 is skipped, so we expect calls for 1 and 2
- expect(setSeries).toEqual([
+ expect(setSeries).toStrictEqual([
[1, { show: true }],
[2, { show: false }],
]);
@@ -249,7 +249,7 @@ describe('PlotContext', () => {
const setSeries = (plot.setSeries as jest.Mock).mock.calls;
// After reset, all non-zero series should be shown
- expect(setSeries).toEqual([
+ expect(setSeries).toStrictEqual([
[1, { show: true }],
[2, { show: true }],
]);
diff --git a/frontend/src/lib/uPlotV2/hooks/__tests__/useLegendsSync.test.ts b/frontend/src/lib/uPlotV2/hooks/__tests__/useLegendsSync.test.ts
index 5c4d5e4dd9..e2b61a6024 100644
--- a/frontend/src/lib/uPlotV2/hooks/__tests__/useLegendsSync.test.ts
+++ b/frontend/src/lib/uPlotV2/hooks/__tests__/useLegendsSync.test.ts
@@ -96,7 +96,7 @@ describe('useLegendsSync', () => {
expect.any(Function),
);
- expect(result.current.legendItemsMap).toEqual(initialItems);
+ expect(result.current.legendItemsMap).toStrictEqual(initialItems);
});
it('updates focusedSeriesIndex when a series gains focus via setSeries by default', async () => {
@@ -168,7 +168,7 @@ describe('useLegendsSync', () => {
invokeSetSeries(1, { show: true });
const after = result.current.legendItemsMap;
- expect(after).toEqual(before);
+ expect(after).toStrictEqual(before);
});
it('cancels pending visibility RAF on unmount', () => {
diff --git a/frontend/src/lib/uPlotV2/utils/__tests__/dataUtils.test.ts b/frontend/src/lib/uPlotV2/utils/__tests__/dataUtils.test.ts
index e2ac93899a..49e4fd5cab 100644
--- a/frontend/src/lib/uPlotV2/utils/__tests__/dataUtils.test.ts
+++ b/frontend/src/lib/uPlotV2/utils/__tests__/dataUtils.test.ts
@@ -105,8 +105,8 @@ describe('dataUtils', () => {
const result = insertLargeGapNullsIntoAlignedData(data, options);
- expect(result[0]).toEqual([0, 50, 100]);
- expect(result[1]).toEqual([1, null, 2]);
+ expect(result[0]).toStrictEqual([0, 50, 100]);
+ expect(result[1]).toStrictEqual([1, null, 2]);
});
it('inserts nulls at every gap that exceeds the threshold', () => {
@@ -120,8 +120,8 @@ describe('dataUtils', () => {
const result = insertLargeGapNullsIntoAlignedData(data, options);
- expect(result[0]).toEqual([0, 50, 100, 110, 160, 210]);
- expect(result[1]).toEqual([1, null, 2, 3, null, 4]);
+ expect(result[0]).toStrictEqual([0, 50, 100, 110, 160, 210]);
+ expect(result[1]).toStrictEqual([1, null, 2, 3, null, 4]);
});
it('inserts null for all series at a gap triggered by any one series', () => {
@@ -140,9 +140,9 @@ describe('dataUtils', () => {
const result = insertLargeGapNullsIntoAlignedData(data, options);
- expect(result[0]).toEqual([0, 50, 100]);
- expect(result[1]).toEqual([1, null, 2]);
- expect(result[2]).toEqual([3, null, 4]);
+ expect(result[0]).toStrictEqual([0, 50, 100]);
+ expect(result[1]).toStrictEqual([1, null, 2]);
+ expect(result[2]).toStrictEqual([3, null, 4]);
});
it('ignores boolean spanGaps options (only numeric values trigger insertion)', () => {
@@ -187,8 +187,8 @@ describe('dataUtils', () => {
const result = insertLargeGapNullsIntoAlignedData(data, options);
- expect(result[0]).toEqual([0, 50, 100, 110]);
- expect(result[1]).toEqual([1, null, null, 2]);
+ expect(result[0]).toStrictEqual([0, 50, 100, 110]);
+ expect(result[1]).toStrictEqual([1, null, null, 2]);
});
});
@@ -209,7 +209,7 @@ describe('dataUtils', () => {
const result = applySpanGapsToAlignedData(data, options);
- expect(result[1]).toEqual(ys);
+ expect(result[1]).toStrictEqual(ys);
});
it('converts nulls to undefined when spanGaps is true', () => {
@@ -219,7 +219,7 @@ describe('dataUtils', () => {
const result = applySpanGapsToAlignedData(data, options);
- expect(result[1]).toEqual([1, undefined, 2, undefined]);
+ expect(result[1]).toStrictEqual([1, undefined, 2, undefined]);
});
it('leaves data unchanged when spanGaps is false', () => {
@@ -229,7 +229,7 @@ describe('dataUtils', () => {
const result = applySpanGapsToAlignedData(data, options);
- expect(result[1]).toEqual(ys);
+ expect(result[1]).toStrictEqual(ys);
});
it('inserts a null break point when a gap exceeds the numeric threshold', () => {
@@ -242,8 +242,8 @@ describe('dataUtils', () => {
const result = applySpanGapsToAlignedData(data, options);
- expect(result[0]).toEqual([0, 50, 100, 110]);
- expect(result[1]).toEqual([1, null, 2, 3]);
+ expect(result[0]).toStrictEqual([0, 50, 100, 110]);
+ expect(result[1]).toStrictEqual([1, null, 2, 3]);
});
it('returns original data when no gap exceeds the numeric threshold', () => {
@@ -273,11 +273,11 @@ describe('dataUtils', () => {
const result = applySpanGapsToAlignedData(data, options);
// x-axis extended with the inserted midpoint
- expect(result[0]).toEqual([0, 50, 100]);
+ expect(result[0]).toStrictEqual([0, 50, 100]);
// series 0: null at midpoint breaks the line
- expect(result[1]).toEqual([1, null, 2]);
+ expect(result[1]).toStrictEqual([1, null, 2]);
// series 1: null at midpoint converted to undefined → line spans over it
- expect(result[2]).toEqual([3, undefined, 4]);
+ expect(result[2]).toStrictEqual([3, undefined, 4]);
});
});
});
diff --git a/frontend/src/lib/uPlotV2/utils/__tests__/scale.test.ts b/frontend/src/lib/uPlotV2/utils/__tests__/scale.test.ts
index b493be1f92..6c08f20732 100644
--- a/frontend/src/lib/uPlotV2/utils/__tests__/scale.test.ts
+++ b/frontend/src/lib/uPlotV2/utils/__tests__/scale.test.ts
@@ -19,7 +19,7 @@ describe('scale utils', () => {
limits,
});
- expect(result).toEqual(limits);
+ expect(result).toStrictEqual(limits);
});
it('snaps positive limits to powers of the log base when distribution is logarithmic', () => {
@@ -49,7 +49,7 @@ describe('scale utils', () => {
logBase: 2,
});
- expect(config).toEqual({});
+ expect(config).toStrictEqual({});
});
it('returns linear distribution settings for non-time scales', () => {
@@ -80,13 +80,13 @@ describe('scale utils', () => {
const { rangeConfig, hardMinOnly, hardMaxOnly, hasFixedRange } =
scaleUtils.getRangeConfig(0, 100, null, null, 0.1, 0.2);
- expect(rangeConfig.min).toEqual({
+ expect(rangeConfig.min).toStrictEqual({
pad: 0.1,
hard: 0,
soft: undefined,
mode: 3,
});
- expect(rangeConfig.max).toEqual({
+ expect(rangeConfig.max).toStrictEqual({
pad: 0.2,
hard: 100,
soft: undefined,
@@ -127,7 +127,7 @@ describe('scale utils', () => {
'y',
);
- expect(result).toEqual([null, null]);
+ expect(result).toStrictEqual([null, null]);
});
it('applies hard min/max for linear scale when only hard limits are set', () => {
@@ -156,7 +156,7 @@ describe('scale utils', () => {
const result = rangeFn(u, 10, 20, 'y');
// After applyHardLimits, the returned range should respect configured min/max
- expect(result).toEqual([0, 100]);
+ expect(result).toStrictEqual([0, 100]);
});
});
@@ -164,7 +164,7 @@ describe('scale utils', () => {
it('returns original soft limits when there are no thresholds', () => {
const result = scaleUtils.adjustSoftLimitsWithThresholds(1, 5, [], 'ms');
- expect(result).toEqual({ softMin: 1, softMax: 5 });
+ expect(result).toStrictEqual({ softMin: 1, softMax: 5 });
});
it('expands soft limits to include threshold min/max values', () => {
diff --git a/frontend/src/lib/uPlotV2/utils/__tests__/seriesPointsFilter.test.ts b/frontend/src/lib/uPlotV2/utils/__tests__/seriesPointsFilter.test.ts
index aaa4b7de6a..d652dc08d6 100644
--- a/frontend/src/lib/uPlotV2/utils/__tests__/seriesPointsFilter.test.ts
+++ b/frontend/src/lib/uPlotV2/utils/__tests__/seriesPointsFilter.test.ts
@@ -78,7 +78,7 @@ describe('findSandwichedIndices', () => {
];
const yData = [1, null, null, 2];
const u = makeUPlot({ xData: [0, 1, 2, 3], yData });
- expect(findSandwichedIndices(gaps, yData, u)).toEqual([]);
+ expect(findSandwichedIndices(gaps, yData, u)).toStrictEqual([]);
});
it('returns the index between two gaps that share a pixel boundary', () => {
@@ -90,7 +90,7 @@ describe('findSandwichedIndices', () => {
// posToIdx(10) → 2
const yData = [null, null, 5, null, null];
const u = makeUPlot({ xData: [0, 1, 2, 3, 4], yData, posToIdxFn: () => 2 });
- expect(findSandwichedIndices(gaps, yData, u)).toEqual([2]);
+ expect(findSandwichedIndices(gaps, yData, u)).toStrictEqual([2]);
});
it('scans to nearest non-null when posToIdx lands on a null', () => {
@@ -101,7 +101,7 @@ describe('findSandwichedIndices', () => {
];
const yData = [null, null, null, 7, null];
const u = makeUPlot({ xData: [0, 1, 2, 3, 4], yData, posToIdxFn: () => 2 });
- expect(findSandwichedIndices(gaps, yData, u)).toEqual([3]);
+ expect(findSandwichedIndices(gaps, yData, u)).toStrictEqual([3]);
});
it('returns multiple indices when several gap pairs share boundaries', () => {
@@ -118,7 +118,7 @@ describe('findSandwichedIndices', () => {
yData,
posToIdxFn: (pos) => (pos === 10 ? 1 : 3),
});
- expect(findSandwichedIndices(gaps, yData, u)).toEqual([1, 3]);
+ expect(findSandwichedIndices(gaps, yData, u)).toStrictEqual([1, 3]);
});
});
diff --git a/frontend/src/lib/uPlotV2/utils/__tests__/threshold.test.ts b/frontend/src/lib/uPlotV2/utils/__tests__/threshold.test.ts
index 6f1f7427a3..6b057c5ca7 100644
--- a/frontend/src/lib/uPlotV2/utils/__tests__/threshold.test.ts
+++ b/frontend/src/lib/uPlotV2/utils/__tests__/threshold.test.ts
@@ -2,7 +2,7 @@ import { findMinMaxThresholdValues } from '../threshold';
describe('findMinMaxThresholdValues', () => {
it('returns [null, null] when thresholds array is empty or missing', () => {
- expect(findMinMaxThresholdValues([], 'ms')).toEqual([null, null]);
+ expect(findMinMaxThresholdValues([], 'ms')).toStrictEqual([null, null]);
});
it('returns min and max from thresholdValue when units are not provided', () => {
diff --git a/frontend/src/pages/LogsExplorer/__tests__/LogsExplorer.test.tsx b/frontend/src/pages/LogsExplorer/__tests__/LogsExplorer.test.tsx
index 2538d5bb6f..b8f4845b0f 100644
--- a/frontend/src/pages/LogsExplorer/__tests__/LogsExplorer.test.tsx
+++ b/frontend/src/pages/LogsExplorer/__tests__/LogsExplorer.test.tsx
@@ -88,7 +88,7 @@ const logsQueryServerRequest = (): void =>
);
describe('Logs Explorer Tests', () => {
- test('Logs Explorer default view test without data', async () => {
+ it('Logs Explorer default view test without data', async () => {
const { getByRole, queryByText, getByTestId, queryByTestId, container } =
render(
<MemoryRouter
@@ -131,7 +131,7 @@ describe('Logs Explorer Tests', () => {
});
// update this test properly
- test.skip('Logs Explorer Page should render with data', async () => {
+ it.skip('Logs Explorer Page should render with data', async () => {
// mocking the query range API to return the logs
logsQueryServerRequest();
const { queryByText, queryByTestId } = render(
@@ -166,7 +166,7 @@ describe('Logs Explorer Tests', () => {
);
});
- test('Multiple Current Queries', async () => {
+ it('Multiple Current Queries', async () => {
// mocking the query range API to return the logs
logsQueryServerRequest();
const { queryAllByText } = render(
@@ -235,10 +235,10 @@ describe('Logs Explorer Tests', () => {
const queries = queryAllByText(
"Enter your filter query (e.g., http.status_code >= 500 AND service.name = 'frontend')",
);
- expect(queries.length).toBe(1);
+ expect(queries).toHaveLength(1);
});
- test('frequency chart visibility and switch toggle', async () => {
+ it('frequency chart visibility and switch toggle', async () => {
const { getByRole, queryByText } = render(
<MemoryRouter
initialEntries={[
diff --git a/frontend/src/pages/SaveView/__test__/SaveView.test.tsx b/frontend/src/pages/SaveView/__test__/SaveView.test.tsx
index c6bfe16c6d..e9fb3b336d 100644
--- a/frontend/src/pages/SaveView/__test__/SaveView.test.tsx
+++ b/frontend/src/pages/SaveView/__test__/SaveView.test.tsx
@@ -28,7 +28,7 @@ jest.mock('react-router-dom', () => {
describe('SaveView', () => {
it('should render the SaveView component', async () => {
render(<SaveView />);
- expect(await screen.findByText('Table View')).toBeInTheDocument();
+ await expect(screen.findByText('Table View')).resolves.toBeInTheDocument();
const savedViews = screen.getAllByRole('row');
expect(savedViews).toHaveLength(2);
@@ -53,7 +53,7 @@ describe('SaveView', () => {
</MemoryRouter>,
);
- expect(await screen.findByText('Table View')).toBeInTheDocument();
+ await expect(screen.findByText('Table View')).resolves.toBeInTheDocument();
const explorerIcon = await screen.findAllByTestId('go-to-explorer');
expect(explorerIcon[0]).toBeInTheDocument();
@@ -73,7 +73,7 @@ describe('SaveView', () => {
it('should render the SaveView component with a search input', async () => {
render(<SaveView />);
const searchInput = screen.getByPlaceholderText('Search for views...');
- expect(await screen.findByText('Table View')).toBeInTheDocument();
+ await expect(screen.findByText('Table View')).resolves.toBeInTheDocument();
expect(searchInput).toBeInTheDocument();
@@ -88,7 +88,7 @@ describe('SaveView', () => {
expect(searchInput).toHaveValue('R-test panel');
searchInput.blur();
- expect(await screen.findByText('R-test panel')).toBeInTheDocument();
+ await expect(screen.findByText('R-test panel')).resolves.toBeInTheDocument();
// Table View should not be present now
const savedViews = screen.getAllByRole('row');
@@ -146,7 +146,9 @@ describe('SaveView', () => {
const deleteButton = await screen.findAllByTestId('delete-view');
fireEvent.click(deleteButton[0]);
- expect(await screen.findByText('delete_confirm_message')).toBeInTheDocument();
+ await expect(
+ screen.findByText('delete_confirm_message'),
+ ).resolves.toBeInTheDocument();
const confirmButton = await screen.findByTestId('confirm-delete');
fireEvent.click(confirmButton);
diff --git a/frontend/src/pages/ServiceTopLevelOperations/index.tsx b/frontend/src/pages/ServiceTopLevelOperations/index.tsx
index 6b4c210d98..17ad6117d8 100644
--- a/frontend/src/pages/ServiceTopLevelOperations/index.tsx
+++ b/frontend/src/pages/ServiceTopLevelOperations/index.tsx
@@ -124,7 +124,7 @@ export default function ServiceTopLevelOperations(): JSX.Element {
columns={columns}
bordered
title={(): string => 'Top Level Operations'}
- // @ts-ignore
+ // @ts-expect-error
dataSource={topLevelOperations}
loading={isLoading}
showHeader={false}
diff --git a/frontend/src/pages/Services/Metrics.test.tsx b/frontend/src/pages/Services/Metrics.test.tsx
index fcafd76466..9dc52550c7 100644
--- a/frontend/src/pages/Services/Metrics.test.tsx
+++ b/frontend/src/pages/Services/Metrics.test.tsx
@@ -3,7 +3,7 @@ import { render, screen } from 'tests/test-utils';
import Metrics from '.';
describe('Services', () => {
- test('Should render the component', () => {
+ it('Should render the component', () => {
render(<Metrics />);
const inputBox = screen.getByTestId('resource-attributes-filter');
diff --git a/frontend/src/pages/SignUp/__tests__/SignUp.test.tsx b/frontend/src/pages/SignUp/__tests__/SignUp.test.tsx
index 136afb38dd..379169c154 100644
--- a/frontend/src/pages/SignUp/__tests__/SignUp.test.tsx
+++ b/frontend/src/pages/SignUp/__tests__/SignUp.test.tsx
@@ -138,9 +138,9 @@ describe('SignUp Component - Regular Signup', () => {
await user.type(confirmPasswordInput, 'password456');
await user.tab(); // Blur the confirm password field to trigger validation
- expect(
- await screen.findByText(/passwords don't match/i),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText(/passwords don't match/i),
+ ).resolves.toBeInTheDocument();
});
it('clears password mismatch error when passwords match', async () => {
@@ -157,9 +157,9 @@ describe('SignUp Component - Regular Signup', () => {
await user.type(confirmPasswordInput, 'password456');
await user.tab(); // Blur the confirm password field to trigger validation
- expect(
- await screen.findByText(/passwords don't match/i),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByText(/passwords don't match/i),
+ ).resolves.toBeInTheDocument();
await user.clear(confirmPasswordInput);
await user.type(confirmPasswordInput, 'password123');
diff --git a/frontend/src/pages/TracesExplorer/__test__/TracesExplorer.test.tsx b/frontend/src/pages/TracesExplorer/__test__/TracesExplorer.test.tsx
index 0651cc0bf7..e5c1ef053d 100644
--- a/frontend/src/pages/TracesExplorer/__test__/TracesExplorer.test.tsx
+++ b/frontend/src/pages/TracesExplorer/__test__/TracesExplorer.test.tsx
@@ -280,7 +280,7 @@ describe('TracesExplorer - Filters', () => {
redirectWithQueryBuilderData.mock.calls[
redirectWithQueryBuilderData.mock.calls.length - 1
][0].builder.queryData[0].filters.items,
- ).toEqual(
+ ).toStrictEqual(
expect.arrayContaining([
expect.objectContaining({
key: {
@@ -302,7 +302,7 @@ describe('TracesExplorer - Filters', () => {
redirectWithQueryBuilderData.mock.calls[
redirectWithQueryBuilderData.mock.calls.length - 1
][0].builder.queryData[0].filters.items,
- ).toEqual(
+ ).toStrictEqual(
expect.arrayContaining([
expect.objectContaining({
key: {
@@ -326,9 +326,9 @@ describe('TracesExplorer - Filters', () => {
const { findByText, getByTestId } = render(<Filter setOpen={jest.fn()} />);
// check if the default query is applied - composite query has filters - serviceName : demo-app and name : HTTP GET /customer
- expect(await findByText('demo-app')).toBeInTheDocument();
+ await expect(findByText('demo-app')).resolves.toBeInTheDocument();
expect(getByTestId('serviceName-demo-app')).toBeChecked();
- expect(await findByText('HTTP GET /customer')).toBeInTheDocument();
+ await expect(findByText('HTTP GET /customer')).resolves.toBeInTheDocument();
expect(getByTestId('name-HTTP GET /customer')).toBeChecked();
});
@@ -427,7 +427,7 @@ describe('TracesExplorer - Filters', () => {
redirectWithQueryBuilderData.mock.calls[
redirectWithQueryBuilderData.mock.calls.length - 1
][0].builder.queryData[0].filters.items,
- ).toEqual(
+ ).toStrictEqual(
expect.arrayContaining([
expect.objectContaining({
key: {
@@ -461,7 +461,7 @@ describe('TracesExplorer - Filters', () => {
redirectWithQueryBuilderData.mock.calls[
redirectWithQueryBuilderData.mock.calls.length - 1
][0].builder.queryData[0].filters.items,
- ).not.toEqual(
+ ).not.toStrictEqual(
expect.arrayContaining([
expect.objectContaining({
key: {
@@ -486,7 +486,7 @@ describe('TracesExplorer - Filters', () => {
redirectWithQueryBuilderData.mock.calls[
redirectWithQueryBuilderData.mock.calls.length - 1
][0].builder.queryData[0].filters.items,
- ).toEqual([]);
+ ).toStrictEqual([]);
});
});
@@ -499,7 +499,7 @@ jest.mock('hooks/useHandleExplorerTabChange', () => ({
let capturedPayload: QueryRangePayloadV5;
-describe('TracesExplorer - ', () => {
+describe('TracesExplorer -', () => {
const quickFiltersListURL = `${BASE_URL}/api/v1/orgs/me/filters/traces`;
const setupServer = (): void => {
@@ -566,9 +566,9 @@ describe('TracesExplorer - ', () => {
expect(capturedPayload).toBeDefined();
});
- expect((capturedPayload.compositeQuery.queries[0].spec as any).order).toEqual(
- [{ key: { name: 'timestamp' }, direction: 'desc' }],
- );
+ expect(
+ (capturedPayload.compositeQuery.queries[0].spec as any).order,
+ ).toStrictEqual([{ key: { name: 'timestamp' }, direction: 'desc' }]);
});
it.skip('trace explorer - table view', async () => {
@@ -601,7 +601,9 @@ describe('TracesExplorer - ', () => {
['/traces-explorer/?panelType=trace&selectedExplorerView=trace'],
);
- expect(await screen.findByText('Root Service Name')).toBeInTheDocument();
+ await expect(
+ screen.findByText('Root Service Name'),
+ ).resolves.toBeInTheDocument();
// assert table headers
expect(getByText('Root Operation Name')).toBeInTheDocument();
@@ -620,7 +622,7 @@ describe('TracesExplorer - ', () => {
fireEvent.click(traceId);
// assert redirection - should go to /trace/:traceId
- expect(window.location.href).toEqual(
+ expect(window.location.href).toBe(
'http://localhost/trace/5765b60ba7cc4ddafe8bdaa9c1b4b246',
);
});
@@ -653,10 +655,10 @@ describe('TracesExplorer - ', () => {
expect(capturedPayload).toBeDefined();
expect(
(capturedPayload?.compositeQuery?.queries[0].spec as any).order,
- ).toEqual(defaultOrderBy);
+ ).toStrictEqual(defaultOrderBy);
expect(
(capturedPayload?.compositeQuery?.queries[0].spec as any).order,
- ).not.toEqual(orderBy);
+ ).not.toStrictEqual(orderBy);
});
});
@@ -679,7 +681,9 @@ describe('TracesExplorer - ', () => {
fireEvent.click(hideExplorerOption);
// explorer options should hide and show btn should be present
- expect(await screen.findByTestId('show-explorer-option')).toBeInTheDocument();
+ await expect(
+ screen.findByTestId('show-explorer-option'),
+ ).resolves.toBeInTheDocument();
expect(screen.queryByTestId('hide-toolbar')).toBeNull();
// show explorer options
@@ -688,7 +692,9 @@ describe('TracesExplorer - ', () => {
fireEvent.click(showExplorerOption);
// explorer options should show and hide btn should be present
- expect(await screen.findByTestId('hide-toolbar')).toBeInTheDocument();
+ await expect(
+ screen.findByTestId('hide-toolbar'),
+ ).resolves.toBeInTheDocument();
});
it('select a view options - assert and save this view', async () => {
@@ -706,9 +712,9 @@ describe('TracesExplorer - ', () => {
fireEvent.mouseDown(viewSearchInput);
- expect(
- await screen.findByRole('option', { name: 'R-test panel' }),
- ).toBeInTheDocument();
+ await expect(
+ screen.findByRole('option', { name: 'R-test panel' }),
+ ).resolves.toBeInTheDocument();
// save this view
fireEvent.click(await screen.findByText('Save this view'));
@@ -749,7 +755,7 @@ describe('TracesExplorer - ', () => {
expect(createDashboardBtn).toBeInTheDocument();
fireEvent.click(createDashboardBtn);
- expect(await screen.findByText('Export Panel')).toBeInTheDocument();
+ await expect(screen.findByText('Export Panel')).resolves.toBeInTheDocument();
const createDashboardModal = document.querySelector(
'.ant-modal-content',
) as HTMLElement;
diff --git a/frontend/src/pages/WorkspaceLocked/WorkspaceLocked.test.tsx b/frontend/src/pages/WorkspaceLocked/WorkspaceLocked.test.tsx
index 972a27d0b0..82b2c9dbc3 100644
--- a/frontend/src/pages/WorkspaceLocked/WorkspaceLocked.test.tsx
+++ b/frontend/src/pages/WorkspaceLocked/WorkspaceLocked.test.tsx
@@ -8,7 +8,7 @@ import WorkspaceLocked from '.';
describe('WorkspaceLocked', () => {
const apiURL = 'http://localhost/api/v2/licenses';
- test('Should render the component', async () => {
+ it('Should render the component', async () => {
server.use(
rest.get(apiURL, (req, res, ctx) =>
res(ctx.status(200), ctx.json(licensesSuccessWorkspaceLockedResponse)),
@@ -30,7 +30,7 @@ describe('WorkspaceLocked', () => {
expect(contactUsBtn).toBeInTheDocument();
});
- test('Render for Admin', async () => {
+ it('Render for Admin', async () => {
server.use(
rest.get(apiURL, (req, res, ctx) =>
res(ctx.status(200), ctx.json(licensesSuccessWorkspaceLockedResponse)),
@@ -48,7 +48,7 @@ describe('WorkspaceLocked', () => {
expect(updateCreditCardBtn).toBeInTheDocument();
});
- test('Render for non Admin', async () => {
+ it('Render for non Admin', async () => {
server.use(
rest.get(apiURL, (req, res, ctx) =>
res(ctx.status(200), ctx.json(licensesSuccessWorkspaceLockedResponse)),
diff --git a/frontend/src/providers/Dashboard/__tests__/Dashboard.test.tsx b/frontend/src/providers/Dashboard/__tests__/Dashboard.test.tsx
index 8e536938b3..1feaad0c9a 100644
--- a/frontend/src/providers/Dashboard/__tests__/Dashboard.test.tsx
+++ b/frontend/src/providers/Dashboard/__tests__/Dashboard.test.tsx
@@ -269,12 +269,12 @@ describe('Dashboard Provider - Query Key with Route Params', () => {
.getAll()
.map((query) => query.queryKey);
expect(cacheKeys).toHaveLength(2);
- expect(cacheKeys[0]).toEqual([
+ expect(cacheKeys[0]).toStrictEqual([
REACT_QUERY_KEY.DASHBOARD_BY_ID,
dashboardId1,
true, // globalTime.isAutoRefreshDisabled
]);
- expect(cacheKeys[1]).toEqual([
+ expect(cacheKeys[1]).toStrictEqual([
REACT_QUERY_KEY.DASHBOARD_BY_ID,
dashboardId2,
true, // globalTime.isAutoRefreshDisabled
@@ -475,7 +475,10 @@ describe('Dashboard Provider - URL Variables Integration', () => {
// The selectedValue should be updated with normalized URL values
expect(parsedVariables.environment.selectedValue).toBe('development');
- expect(parsedVariables.services.selectedValue).toEqual(['db', 'cache']);
+ expect(parsedVariables.services.selectedValue).toStrictEqual([
+ 'db',
+ 'cache',
+ ]);
// allSelected should be set to false when URL values override
expect(parsedVariables.environment.allSelected).toBe(false);
diff --git a/frontend/src/providers/Dashboard/__tests__/normalizeUrlValue.test.ts b/frontend/src/providers/Dashboard/__tests__/normalizeUrlValue.test.ts
index 70bebe9aa1..b317e70a3b 100644
--- a/frontend/src/providers/Dashboard/__tests__/normalizeUrlValue.test.ts
+++ b/frontend/src/providers/Dashboard/__tests__/normalizeUrlValue.test.ts
@@ -17,7 +17,7 @@ const multiSelectVariable: Partial<IDashboardVariable> = {
describe('normalizeUrlValueForVariable', () => {
describe('Single select variable', () => {
- test('should keep single string value as is', () => {
+ it('should keep single string value as is', () => {
const result = normalizeUrlValueForVariable(
'production',
singleSelectVariable as IDashboardVariable,
@@ -25,7 +25,7 @@ describe('normalizeUrlValueForVariable', () => {
expect(result).toBe('production');
});
- test('should keep single number value as is', () => {
+ it('should keep single number value as is', () => {
const result = normalizeUrlValueForVariable(
123,
singleSelectVariable as IDashboardVariable,
@@ -33,7 +33,7 @@ describe('normalizeUrlValueForVariable', () => {
expect(result).toBe(123);
});
- test('should take first element from array', () => {
+ it('should take first element from array', () => {
const result = normalizeUrlValueForVariable(
['production', 'staging'],
singleSelectVariable as IDashboardVariable,
@@ -41,7 +41,7 @@ describe('normalizeUrlValueForVariable', () => {
expect(result).toBe('production');
});
- test('should return null for empty array', () => {
+ it('should return null for empty array', () => {
const result = normalizeUrlValueForVariable(
[],
singleSelectVariable as IDashboardVariable,
@@ -49,7 +49,7 @@ describe('normalizeUrlValueForVariable', () => {
expect(result).toBeNull();
});
- test('should handle null/undefined values', () => {
+ it('should handle null/undefined values', () => {
expect(
normalizeUrlValueForVariable(
null,
@@ -66,39 +66,39 @@ describe('normalizeUrlValueForVariable', () => {
});
describe('Multi select variable', () => {
- test('should convert string to array', () => {
+ it('should convert string to array', () => {
const result = normalizeUrlValueForVariable(
'production',
multiSelectVariable as IDashboardVariable,
);
- expect(result).toEqual(['production']);
+ expect(result).toStrictEqual(['production']);
});
- test('should convert number to array', () => {
+ it('should convert number to array', () => {
const result = normalizeUrlValueForVariable(
123,
multiSelectVariable as IDashboardVariable,
);
- expect(result).toEqual([123]);
+ expect(result).toStrictEqual([123]);
});
- test('should keep array as is', () => {
+ it('should keep array as is', () => {
const result = normalizeUrlValueForVariable(
['production', 'staging'],
multiSelectVariable as IDashboardVariable,
);
- expect(result).toEqual(['production', 'staging']);
+ expect(result).toStrictEqual(['production', 'staging']);
});
- test('should keep empty array as is', () => {
+ it('should keep empty array as is', () => {
const result = normalizeUrlValueForVariable(
[],
multiSelectVariable as IDashboardVariable,
);
- expect(result).toEqual([]);
+ expect(result).toStrictEqual([]);
});
- test('should handle null/undefined values', () => {
+ it('should handle null/undefined values', () => {
expect(
normalizeUrlValueForVariable(
null,
@@ -115,7 +115,7 @@ describe('normalizeUrlValueForVariable', () => {
});
describe('Real world scenarios', () => {
- test('URL has array ["test", "prod"] for single select variable -> should take "test"', () => {
+ it('URL has array ["test", "prod"] for single select variable -> should take "test"', () => {
const result = normalizeUrlValueForVariable(
['test', 'prod'],
singleSelectVariable as IDashboardVariable,
@@ -123,15 +123,15 @@ describe('normalizeUrlValueForVariable', () => {
expect(result).toBe('test');
});
- test('URL has string "test" for multi select variable -> should convert to ["test"]', () => {
+ it('URL has string "test" for multi select variable -> should convert to ["test"]', () => {
const result = normalizeUrlValueForVariable(
'test',
multiSelectVariable as IDashboardVariable,
);
- expect(result).toEqual(['test']);
+ expect(result).toStrictEqual(['test']);
});
- test('Handles mixed types in array for single select', () => {
+ it('Handles mixed types in array for single select', () => {
const result = normalizeUrlValueForVariable(
['test', 123, true],
singleSelectVariable as IDashboardVariable,
diff --git a/frontend/src/providers/Dashboard/store/__tests__/variableFetchStore.test.ts b/frontend/src/providers/Dashboard/store/__tests__/variableFetchStore.test.ts
index 4d93cd67e8..4666d9231e 100644
--- a/frontend/src/providers/Dashboard/store/__tests__/variableFetchStore.test.ts
+++ b/frontend/src/providers/Dashboard/store/__tests__/variableFetchStore.test.ts
@@ -63,7 +63,11 @@ describe('variableFetchStore', () => {
initializeVariableFetchStore(['a', 'b', 'c']);
const storeSnapshot = variableFetchStore.getSnapshot();
- expect(storeSnapshot.states).toEqual({ a: 'idle', b: 'idle', c: 'idle' });
+ expect(storeSnapshot.states).toStrictEqual({
+ a: 'idle',
+ b: 'idle',
+ c: 'idle',
+ });
});
it('should preserve existing states for known variables', () => {
@@ -103,7 +107,7 @@ describe('variableFetchStore', () => {
initializeVariableFetchStore([]);
const storeSnapshot = variableFetchStore.getSnapshot();
- expect(storeSnapshot.states).toEqual({});
+ expect(storeSnapshot.states).toStrictEqual({});
});
});
diff --git a/frontend/src/providers/Dashboard/store/dashboardVariables/__tests__/dashboardVariablesStore.test.ts b/frontend/src/providers/Dashboard/store/dashboardVariables/__tests__/dashboardVariablesStore.test.ts
index 4b87ac8eaa..9ab900638b 100644
--- a/frontend/src/providers/Dashboard/store/dashboardVariables/__tests__/dashboardVariablesStore.test.ts
+++ b/frontend/src/providers/Dashboard/store/dashboardVariables/__tests__/dashboardVariablesStore.test.ts
@@ -50,8 +50,8 @@ describe('dashboardVariablesStore', () => {
const storeSnapshot = dashboardVariablesStore.getSnapshot();
expect(storeSnapshot.dashboardId).toBe('dash-1');
- expect(storeSnapshot.variables).toEqual(variables);
- expect(storeSnapshot.variableTypes).toEqual({ env: 'QUERY' });
+ expect(storeSnapshot.variables).toStrictEqual(variables);
+ expect(storeSnapshot.variableTypes).toStrictEqual({ env: 'QUERY' });
expect(storeSnapshot.sortedVariablesArray).toHaveLength(1);
});
});
@@ -76,11 +76,11 @@ describe('dashboardVariablesStore', () => {
});
const storeSnapshot = dashboardVariablesStore.getSnapshot();
- expect(storeSnapshot.variableTypes).toEqual({
+ expect(storeSnapshot.variableTypes).toStrictEqual({
env: 'QUERY',
dyn1: 'DYNAMIC',
});
- expect(storeSnapshot.dynamicVariableOrder).toEqual(['dyn1']);
+ expect(storeSnapshot.dynamicVariableOrder).toStrictEqual(['dyn1']);
});
it('should replace dashboardId when it does not match', () => {
@@ -100,10 +100,10 @@ describe('dashboardVariablesStore', () => {
const storeSnapshot = dashboardVariablesStore.getSnapshot();
expect(storeSnapshot.dashboardId).toBe('dash-2');
- expect(storeSnapshot.variableTypes).toEqual({
+ expect(storeSnapshot.variableTypes).toStrictEqual({
a: 'QUERY',
});
- expect(storeSnapshot.variableTypes).not.toEqual({
+ expect(storeSnapshot.variableTypes).not.toStrictEqual({
'not-there': 'QUERY',
});
});
@@ -126,8 +126,8 @@ describe('dashboardVariablesStore', () => {
const { variableTypes, dynamicVariableOrder, dependencyData } =
getVariableDependencyContext();
- expect(variableTypes).toEqual({ env: 'QUERY' });
- expect(dynamicVariableOrder).toEqual([]);
+ expect(variableTypes).toStrictEqual({ env: 'QUERY' });
+ expect(dynamicVariableOrder).toStrictEqual([]);
expect(dependencyData).not.toBeNull();
});
diff --git a/frontend/src/providers/Dashboard/store/dashboardVariables/__tests__/dashboardVariablesStoreUtils.test.ts b/frontend/src/providers/Dashboard/store/dashboardVariables/__tests__/dashboardVariablesStoreUtils.test.ts
index 25ea8153ab..b72a71c385 100644
--- a/frontend/src/providers/Dashboard/store/dashboardVariables/__tests__/dashboardVariablesStoreUtils.test.ts
+++ b/frontend/src/providers/Dashboard/store/dashboardVariables/__tests__/dashboardVariablesStoreUtils.test.ts
@@ -33,12 +33,12 @@ describe('dashboardVariablesStoreUtils', () => {
const result = buildSortedVariablesArray(variables);
- expect(result.map((v) => v.name)).toEqual(['a', 'b', 'c']);
+ expect(result.map((v) => v.name)).toStrictEqual(['a', 'b', 'c']);
});
it('should return empty array for empty variables', () => {
const result = buildSortedVariablesArray({});
- expect(result).toEqual([]);
+ expect(result).toStrictEqual([]);
});
it('should create copies of variables (not references)', () => {
@@ -48,7 +48,7 @@ describe('dashboardVariablesStoreUtils', () => {
const result = buildSortedVariablesArray(variables);
expect(result[0]).not.toBe(original);
- expect(result[0]).toEqual(original);
+ expect(result[0]).toStrictEqual(original);
});
});
@@ -63,7 +63,7 @@ describe('dashboardVariablesStoreUtils', () => {
const result = buildVariableTypesMap(sorted);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
env: 'QUERY',
region: 'CUSTOM',
dynVar: 'DYNAMIC',
@@ -72,7 +72,7 @@ describe('dashboardVariablesStoreUtils', () => {
});
it('should return empty object for empty array', () => {
- expect(buildVariableTypesMap([])).toEqual({});
+ expect(buildVariableTypesMap([])).toStrictEqual({});
});
});
@@ -87,7 +87,7 @@ describe('dashboardVariablesStoreUtils', () => {
const result = buildDynamicVariableOrder(sorted);
- expect(result).toEqual(['dyn1', 'dyn2']);
+ expect(result).toStrictEqual(['dyn1', 'dyn2']);
});
it('should return empty array when no DYNAMIC variables exist', () => {
@@ -96,11 +96,11 @@ describe('dashboardVariablesStoreUtils', () => {
createVariable({ name: 'b', type: 'CUSTOM' }),
];
- expect(buildDynamicVariableOrder(sorted)).toEqual([]);
+ expect(buildDynamicVariableOrder(sorted)).toStrictEqual([]);
});
it('should return empty array for empty input', () => {
- expect(buildDynamicVariableOrder([])).toEqual([]);
+ expect(buildDynamicVariableOrder([])).toStrictEqual([]);
});
});
@@ -125,12 +125,12 @@ describe('dashboardVariablesStoreUtils', () => {
expect(result.sortedVariablesArray[0].name).toBe('env');
expect(result.sortedVariablesArray[1].name).toBe('dyn1');
- expect(result.variableTypes).toEqual({
+ expect(result.variableTypes).toStrictEqual({
env: 'QUERY',
dyn1: 'DYNAMIC',
});
- expect(result.dynamicVariableOrder).toEqual(['dyn1']);
+ expect(result.dynamicVariableOrder).toStrictEqual(['dyn1']);
// dependencyData should exist since there are variables
expect(result.dependencyData).not.toBeNull();
@@ -139,10 +139,10 @@ describe('dashboardVariablesStoreUtils', () => {
it('should return null dependencyData for empty variables', () => {
const result = computeDerivedValues({});
- expect(result.sortedVariablesArray).toEqual([]);
+ expect(result.sortedVariablesArray).toStrictEqual([]);
expect(result.dependencyData).toBeNull();
- expect(result.variableTypes).toEqual({});
- expect(result.dynamicVariableOrder).toEqual([]);
+ expect(result.variableTypes).toStrictEqual({});
+ expect(result.dynamicVariableOrder).toStrictEqual([]);
});
it('should handle all four variable types together', () => {
@@ -172,21 +172,21 @@ describe('dashboardVariablesStoreUtils', () => {
const result = computeDerivedValues(variables);
expect(result.sortedVariablesArray).toHaveLength(4);
- expect(result.sortedVariablesArray.map((v) => v.name)).toEqual([
+ expect(result.sortedVariablesArray.map((v) => v.name)).toStrictEqual([
'queryVar',
'customVar',
'dynVar',
'textVar',
]);
- expect(result.variableTypes).toEqual({
+ expect(result.variableTypes).toStrictEqual({
queryVar: 'QUERY',
customVar: 'CUSTOM',
dynVar: 'DYNAMIC',
textVar: 'TEXTBOX',
});
- expect(result.dynamicVariableOrder).toEqual(['dynVar']);
+ expect(result.dynamicVariableOrder).toStrictEqual(['dynVar']);
expect(result.dependencyData).not.toBeNull();
});
@@ -201,7 +201,7 @@ describe('dashboardVariablesStoreUtils', () => {
const result = computeDerivedValues(variables);
- expect(result.sortedVariablesArray.map((v) => v.name)).toEqual([
+ expect(result.sortedVariablesArray.map((v) => v.name)).toStrictEqual([
'a',
'b',
'm',
@@ -221,7 +221,7 @@ describe('dashboardVariablesStoreUtils', () => {
const result = computeDerivedValues(variables);
- expect(result.dynamicVariableOrder).toEqual(['dyn1', 'dyn2', 'dyn3']);
+ expect(result.dynamicVariableOrder).toStrictEqual(['dyn1', 'dyn2', 'dyn3']);
});
it('should build dependency data with query variable order for dependent queries', () => {
@@ -316,7 +316,7 @@ describe('dashboardVariablesStoreUtils', () => {
expect(depData).not.toBeNull();
expect(depData?.transitiveDescendants).toBeDefined();
// region's transitive descendants should include cluster and host
- expect(depData?.transitiveDescendants['region']).toEqual(
+ expect(depData?.transitiveDescendants['region']).toStrictEqual(
expect.arrayContaining(['cluster', 'host']),
);
});
@@ -333,10 +333,10 @@ describe('dashboardVariablesStoreUtils', () => {
const result = computeDerivedValues(variables);
expect(result.sortedVariablesArray).toHaveLength(1);
- expect(result.variableTypes).toEqual({ solo: 'QUERY' });
- expect(result.dynamicVariableOrder).toEqual([]);
+ expect(result.variableTypes).toStrictEqual({ solo: 'QUERY' });
+ expect(result.dynamicVariableOrder).toStrictEqual([]);
expect(result.dependencyData).not.toBeNull();
- expect(result.dependencyData?.order).toEqual(['solo']);
+ expect(result.dependencyData?.order).toStrictEqual(['solo']);
});
it('should handle only non-QUERY variables', () => {
@@ -362,8 +362,8 @@ describe('dashboardVariablesStoreUtils', () => {
expect(result.sortedVariablesArray).toHaveLength(3);
// No QUERY variables, so dependency order should be empty
- expect(result.dependencyData?.order).toEqual([]);
- expect(result.dynamicVariableOrder).toEqual(['dyn1']);
+ expect(result.dependencyData?.order).toStrictEqual([]);
+ expect(result.dynamicVariableOrder).toStrictEqual(['dyn1']);
});
});
});
diff --git a/frontend/src/providers/preferences/__tests__/PreferencesProvider.integration.test.tsx b/frontend/src/providers/preferences/__tests__/PreferencesProvider.integration.test.tsx
index 1d2811dbeb..e3b998c91d 100644
--- a/frontend/src/providers/preferences/__tests__/PreferencesProvider.integration.test.tsx
+++ b/frontend/src/providers/preferences/__tests__/PreferencesProvider.integration.test.tsx
@@ -126,7 +126,7 @@ describe('PreferencesProvider integration', () => {
const stored = getLocalStorageJSON<LogsLocalOptions>(
LOCALSTORAGE.LOGS_LIST_OPTIONS,
);
- expect(stored?.selectColumns).toEqual([
+ expect(stored?.selectColumns).toStrictEqual([
defaultLogsSelectedColumns[0] as TelemetryFieldKey,
]);
});
@@ -291,7 +291,7 @@ describe('PreferencesProvider integration', () => {
const stored = getLocalStorageJSON<TracesLocalOptions>(
LOCALSTORAGE.TRACES_LIST_OPTIONS,
);
- expect(stored?.selectColumns).toEqual([
+ expect(stored?.selectColumns).toStrictEqual([
defaultTraceSelectedColumns[0] as TelemetryFieldKey,
]);
});
diff --git a/frontend/src/providers/preferences/__tests__/logsLoaderConfig.test.ts b/frontend/src/providers/preferences/__tests__/logsLoaderConfig.test.ts
index 8c0d549199..aba41b6110 100644
--- a/frontend/src/providers/preferences/__tests__/logsLoaderConfig.test.ts
+++ b/frontend/src/providers/preferences/__tests__/logsLoaderConfig.test.ts
@@ -63,7 +63,7 @@ describe('logsLoaderConfig', () => {
});
it('should have priority order: local, url, default', () => {
- expect(logsLoaderConfig.priority).toEqual(['local', 'url', 'default']);
+ expect(logsLoaderConfig.priority).toStrictEqual(['local', 'url', 'default']);
});
it('should load from localStorage when available', async () => {
@@ -86,7 +86,7 @@ describe('logsLoaderConfig', () => {
const result = await logsLoaderConfig.local();
- expect(result).toEqual({
+ expect(result).toStrictEqual({
columns: mockColumns,
formatting: {
maxLines: 10,
@@ -103,7 +103,7 @@ describe('logsLoaderConfig', () => {
const result = await logsLoaderConfig.local();
- expect(result).toEqual({
+ expect(result).toStrictEqual({
columns: [] as BaseAutocompleteData[],
formatting: undefined,
});
@@ -131,7 +131,7 @@ describe('logsLoaderConfig', () => {
const result = await logsLoaderConfig.url();
- expect(result).toEqual({
+ expect(result).toStrictEqual({
columns: mockColumns,
formatting: {
maxLines: 5,
@@ -148,7 +148,7 @@ describe('logsLoaderConfig', () => {
const result = await logsLoaderConfig.url();
- expect(result).toEqual({
+ expect(result).toStrictEqual({
columns: [] as BaseAutocompleteData[],
formatting: undefined,
});
@@ -157,7 +157,7 @@ describe('logsLoaderConfig', () => {
it('should provide default values when no other source is available', async () => {
const result = await logsLoaderConfig.default();
- expect(result).toEqual({
+ expect(result).toStrictEqual({
columns: defaultLogsSelectedColumns,
formatting: {
maxLines: 1,
@@ -181,7 +181,7 @@ describe('logsLoaderConfig', () => {
const result = await logsLoaderConfig.url();
// Should only keep logs columns
- expect(result.columns).toEqual(mockLogsColumns);
+ expect(result.columns).toStrictEqual(mockLogsColumns);
});
it('should filter out Traces columns from localStorage', async () => {
@@ -194,7 +194,7 @@ describe('logsLoaderConfig', () => {
const result = await logsLoaderConfig.local();
// Should filter out all Traces columns
- expect(result.columns).toEqual([]);
+ expect(result.columns).toStrictEqual([]);
});
it('should accept valid Logs columns from URL', async () => {
@@ -208,7 +208,7 @@ describe('logsLoaderConfig', () => {
const result = await logsLoaderConfig.url();
- expect(result.columns).toEqual(logsColumns);
+ expect(result.columns).toStrictEqual(logsColumns);
});
it('should fall back to defaults when all columns are filtered out from URL', async () => {
@@ -223,7 +223,7 @@ describe('logsLoaderConfig', () => {
const result = await logsLoaderConfig.url();
// Should return empty array, which triggers fallback to defaults in preferencesLoader
- expect(result.columns).toEqual([]);
+ expect(result.columns).toStrictEqual([]);
});
it('should handle columns without signal field (legacy data)', async () => {
@@ -243,7 +243,7 @@ describe('logsLoaderConfig', () => {
// Without signal field, columns pass through validation
// This matches the current implementation behavior where only columns
// with signal !== 'logs' are filtered out
- expect(result.columns).toEqual(columnsWithoutSignal);
+ expect(result.columns).toStrictEqual(columnsWithoutSignal);
});
});
});
diff --git a/frontend/src/providers/preferences/__tests__/logsUpdaterConfig.test.ts b/frontend/src/providers/preferences/__tests__/logsUpdaterConfig.test.ts
index 7daed39685..1b8f072425 100644
--- a/frontend/src/providers/preferences/__tests__/logsUpdaterConfig.test.ts
+++ b/frontend/src/providers/preferences/__tests__/logsUpdaterConfig.test.ts
@@ -96,7 +96,7 @@ describe('logsUpdaterConfig', () => {
const storedData = JSON.parse(
mockLocalStorage[LOCALSTORAGE.LOGS_LIST_OPTIONS],
);
- expect(storedData.selectColumns).toEqual(newColumns);
+ expect(storedData.selectColumns).toStrictEqual(newColumns);
expect(storedData.maxLines).toBe(1); // Should preserve other fields
// Should not update saved view preferences
@@ -174,7 +174,7 @@ describe('logsUpdaterConfig', () => {
expect(storedData.format).toBe('json');
expect(storedData.fontSize).toBe('large');
expect(storedData.version).toBe(1);
- expect(storedData.selectColumns).toEqual([
+ expect(storedData.selectColumns).toStrictEqual([
{
key: 'column',
type: 'tag',
diff --git a/frontend/src/providers/preferences/__tests__/tracesLoaderConfig.test.ts b/frontend/src/providers/preferences/__tests__/tracesLoaderConfig.test.ts
index 776e185656..f34cc80ca1 100644
--- a/frontend/src/providers/preferences/__tests__/tracesLoaderConfig.test.ts
+++ b/frontend/src/providers/preferences/__tests__/tracesLoaderConfig.test.ts
@@ -51,7 +51,11 @@ describe('tracesLoaderConfig', () => {
});
it('should have priority order: local, url, default', () => {
- expect(tracesLoaderConfig.priority).toEqual(['local', 'url', 'default']);
+ expect(tracesLoaderConfig.priority).toStrictEqual([
+ 'local',
+ 'url',
+ 'default',
+ ]);
});
it('should load from localStorage when available', async () => {
@@ -69,7 +73,7 @@ describe('tracesLoaderConfig', () => {
const result = await tracesLoaderConfig.local();
- expect(result).toEqual({
+ expect(result).toStrictEqual({
columns: mockColumns,
});
});
@@ -80,7 +84,7 @@ describe('tracesLoaderConfig', () => {
const result = await tracesLoaderConfig.local();
- expect(result).toEqual({
+ expect(result).toStrictEqual({
columns: [] as BaseAutocompleteData[],
});
});
@@ -103,7 +107,7 @@ describe('tracesLoaderConfig', () => {
const result = await tracesLoaderConfig.url();
- expect(result).toEqual({
+ expect(result).toStrictEqual({
columns: mockColumns,
});
});
@@ -114,7 +118,7 @@ describe('tracesLoaderConfig', () => {
const result = await tracesLoaderConfig.url();
- expect(result).toEqual({
+ expect(result).toStrictEqual({
columns: [] as BaseAutocompleteData[],
});
});
@@ -122,7 +126,7 @@ describe('tracesLoaderConfig', () => {
it('should provide default values when no other source is available', async () => {
const result = await tracesLoaderConfig.default();
- expect(result).toEqual({
+ expect(result).toStrictEqual({
columns: defaultTraceSelectedColumns as TelemetryFieldKey[],
});
});
@@ -143,7 +147,7 @@ describe('tracesLoaderConfig', () => {
const result = await tracesLoaderConfig.url();
// Should filter out all Logs columns
- expect(result.columns).toEqual([]);
+ expect(result.columns).toStrictEqual([]);
});
it('should filter out Logs columns (timestamp with logs signal) from URL', async () => {
@@ -161,7 +165,7 @@ describe('tracesLoaderConfig', () => {
const result = await tracesLoaderConfig.url();
// Should only keep trace columns
- expect(result.columns).toEqual([
+ expect(result.columns).toStrictEqual([
{ name: 'service.name', signal: 'traces', fieldContext: 'resource' },
]);
});
@@ -179,7 +183,7 @@ describe('tracesLoaderConfig', () => {
const result = await tracesLoaderConfig.local();
// Should filter out all Logs columns
- expect(result.columns).toEqual([]);
+ expect(result.columns).toStrictEqual([]);
});
it('should accept valid Trace columns from URL', async () => {
@@ -196,7 +200,7 @@ describe('tracesLoaderConfig', () => {
const result = await tracesLoaderConfig.url();
- expect(result.columns).toEqual(traceColumns);
+ expect(result.columns).toStrictEqual(traceColumns);
});
it('should fall back to defaults when all columns are filtered out from URL', async () => {
@@ -211,7 +215,7 @@ describe('tracesLoaderConfig', () => {
const result = await tracesLoaderConfig.url();
// Should return empty array, which triggers fallback to defaults in preferencesLoader
- expect(result.columns).toEqual([]);
+ expect(result.columns).toStrictEqual([]);
});
it('should handle columns without signal field (legacy data)', async () => {
@@ -231,7 +235,7 @@ describe('tracesLoaderConfig', () => {
// Without signal field, columns pass through validation
// This matches the current implementation behavior where only columns
// with signal !== 'traces' are filtered out
- expect(result.columns).toEqual(columnsWithoutSignal);
+ expect(result.columns).toStrictEqual(columnsWithoutSignal);
});
});
});
diff --git a/frontend/src/providers/preferences/__tests__/usePreferenceLoader.test.tsx b/frontend/src/providers/preferences/__tests__/usePreferenceLoader.test.tsx
index 5865e2fa12..30870e84cb 100644
--- a/frontend/src/providers/preferences/__tests__/usePreferenceLoader.test.tsx
+++ b/frontend/src/providers/preferences/__tests__/usePreferenceLoader.test.tsx
@@ -61,11 +61,11 @@ describe('usePreferenceLoader', () => {
});
// Should have loaded from local storage (highest priority)
- expect(result.current.preferences).toEqual({
+ expect(result.current.preferences).toStrictEqual({
columns: [{ name: 'local-column' }],
formatting: { maxLines: 5, format: 'table', fontSize: 'medium', version: 1 },
});
- expect(result.current.error).toBe(null);
+ expect(result.current.error).toBeNull();
expect(setReSync).not.toHaveBeenCalled(); // Should not call setReSync when reSync is false
});
@@ -85,7 +85,7 @@ describe('usePreferenceLoader', () => {
});
// Should have loaded trace columns
- expect(result.current.preferences).toEqual({
+ expect(result.current.preferences).toStrictEqual({
columns: [{ name: 'local-trace-column' }],
});
expect(setReSync).not.toHaveBeenCalled(); // Should not call setReSync when reSync is false
diff --git a/frontend/src/store/globalTime/__tests__/utils.test.ts b/frontend/src/store/globalTime/__tests__/utils.test.ts
index 763ccb1be4..3fc187d649 100644
--- a/frontend/src/store/globalTime/__tests__/utils.test.ts
+++ b/frontend/src/store/globalTime/__tests__/utils.test.ts
@@ -59,7 +59,7 @@ describe('globalTime/utils', () => {
const maxTime = 2000000000;
const timeString = `${minTime}${CUSTOM_TIME_SEPARATOR}${maxTime}`;
const result = parseCustomTimeRange(timeString);
- expect(result).toEqual({ minTime, maxTime });
+ expect(result).toStrictEqual({ minTime, maxTime });
});
it('should return null for non-custom time range strings', () => {
@@ -75,7 +75,7 @@ describe('globalTime/utils', () => {
it('should handle zero values', () => {
const result = parseCustomTimeRange(`0${CUSTOM_TIME_SEPARATOR}0`);
- expect(result).toEqual({ minTime: 0, maxTime: 0 });
+ expect(result).toStrictEqual({ minTime: 0, maxTime: 0 });
});
});
@@ -94,7 +94,7 @@ describe('globalTime/utils', () => {
const maxTime = 2000000000;
const timeString = createCustomTimeRange(minTime, maxTime);
const result = parseSelectedTime(timeString);
- expect(result).toEqual({ minTime, maxTime });
+ expect(result).toStrictEqual({ minTime, maxTime });
});
it('should return fallback for invalid custom time range', () => {
diff --git a/frontend/src/tests/mapQueryDataFromApi.test.ts b/frontend/src/tests/mapQueryDataFromApi.test.ts
index 568c58ffbe..9519cb2a29 100644
--- a/frontend/src/tests/mapQueryDataFromApi.test.ts
+++ b/frontend/src/tests/mapQueryDataFromApi.test.ts
@@ -73,8 +73,8 @@ describe('mapQueryDataFromApi', (): void => {
const result = mapQueryDataFromApi(compositeQuery);
expect(result.queryType).toBe(EQueryType.QUERY_BUILDER);
- expect(result.promql).toEqual([]);
- expect(result.clickhouse_sql).toEqual([]);
+ expect(result.promql).toStrictEqual([]);
+ expect(result.clickhouse_sql).toStrictEqual([]);
// Expect one builder query mapped and merged using base query fields
expect(result.builder.queryData).toHaveLength(1);
@@ -84,17 +84,17 @@ describe('mapQueryDataFromApi', (): void => {
expect(q.dataSource).toBe(DataSource.TRACES);
expect(q.stepInterval).toBe(60);
// filter overridden from V5 spec (no trailing space)
- expect(q.filter).toEqual({ expression: "service.name = 'adservice'" });
+ expect(q.filter).toStrictEqual({ expression: "service.name = 'adservice'" });
// having overridden from V5 spec
expect((q.having as unknown as { expression: string }).expression).toBe(
'avg(app.ads.count) != 0',
);
// orderBy preserved from base
- expect(q.orderBy).toEqual([
+ expect(q.orderBy).toStrictEqual([
{ columnName: 'avg(app.ads.count)', order: 'asc' },
]);
// groupBy converted from V5 spec
- expect(q.groupBy).toEqual([
+ expect(q.groupBy).toStrictEqual([
{
key: 'service.name',
dataType: DataTypes.String,
@@ -103,7 +103,7 @@ describe('mapQueryDataFromApi', (): void => {
},
]);
// aggregations replaced with array from V5 spec
- expect(q.aggregations).toEqual<TraceAggregation[]>([
+ expect(q.aggregations).toStrictEqual<TraceAggregation[]>([
{ expression: 'count()' },
{ expression: 'avg(app.ads.count)', alias: 'avtv' },
]);
diff --git a/frontend/src/utils/__tests__/queryContextUtils.test.ts b/frontend/src/utils/__tests__/queryContextUtils.test.ts
index e96b53a629..a46ec59b36 100644
--- a/frontend/src/utils/__tests__/queryContextUtils.test.ts
+++ b/frontend/src/utils/__tests__/queryContextUtils.test.ts
@@ -10,12 +10,12 @@ describe('extractQueryPairs', () => {
jest.clearAllMocks();
});
- test('should extract NOT EXISTS and NOT LIKE correctly', () => {
+ it('should extract NOT EXISTS and NOT LIKE correctly', () => {
const input = "active NOT EXISTS AND name NOT LIKE '%tmp%'";
const result = extractQueryPairs(input);
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{
key: 'active',
operator: 'EXISTS',
@@ -59,10 +59,10 @@ describe('extractQueryPairs', () => {
]);
});
- test('should test for filter expression with freeText', () => {
+ it('should test for filter expression with freeText', () => {
const input = "disconnected deployment.env not in ['mq-kafka']";
const result = extractQueryPairs(input);
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{
key: 'disconnected',
operator: '',
@@ -111,10 +111,10 @@ describe('extractQueryPairs', () => {
]);
});
- test('should extract IN with numeric list inside parentheses', () => {
+ it('should extract IN with numeric list inside parentheses', () => {
const input = 'id IN (1, 2, 3)';
const result = extractQueryPairs(input);
- expect(result).toEqual([
+ expect(result).toStrictEqual([
expect.objectContaining({
key: 'id',
operator: 'IN',
@@ -131,10 +131,10 @@ describe('extractQueryPairs', () => {
]);
});
- test('should handle extra whitespace and separators in IN lists', () => {
+ it('should handle extra whitespace and separators in IN lists', () => {
const input = "label IN [ 'a' , 'b' , 'c' ]";
const result = extractQueryPairs(input);
- expect(result).toEqual([
+ expect(result).toStrictEqual([
expect.objectContaining({
key: 'label',
operator: 'IN',
@@ -151,10 +151,10 @@ describe('extractQueryPairs', () => {
]);
});
- test('should extract correct query pairs when the query has space at the start of the value', () => {
+ it('should extract correct query pairs when the query has space at the start of the value', () => {
const input = " label IN [ 'a' , 'b' , 'c' ]";
const result = extractQueryPairs(input);
- expect(result).toEqual([
+ expect(result).toStrictEqual([
expect.objectContaining({
key: 'label',
operator: 'IN',
@@ -171,10 +171,10 @@ describe('extractQueryPairs', () => {
]);
});
- test('should return incomplete pair when value is missing', () => {
+ it('should return incomplete pair when value is missing', () => {
const input = 'a =';
const result = extractQueryPairs(input);
- expect(result).toEqual([
+ expect(result).toStrictEqual([
expect.objectContaining({
key: 'a',
operator: '=',
@@ -184,10 +184,10 @@ describe('extractQueryPairs', () => {
]);
});
- test('should parse pairs within grouping parentheses with conjunctions', () => {
+ it('should parse pairs within grouping parentheses with conjunctions', () => {
const input = "(name = 'x' AND age > 10) OR active EXISTS";
const result = extractQueryPairs(input);
- expect(result).toEqual([
+ expect(result).toStrictEqual([
expect.objectContaining({
key: 'name',
operator: '=',
@@ -209,13 +209,13 @@ describe('extractQueryPairs', () => {
]);
});
- test('should extract query pairs from complex query with IN operator and multiple conditions', () => {
+ it('should extract query pairs from complex query with IN operator and multiple conditions', () => {
const input =
"service.name IN ['adservice', 'consumer-svc-1'] AND cloud.account.id = 'signoz-staging' code.lineno < 172";
const result = extractQueryPairs(input);
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{
key: 'service.name',
operator: 'IN',
@@ -288,12 +288,12 @@ describe('extractQueryPairs', () => {
]);
});
- test('should extract query pairs from complex query with IN operator without brackets', () => {
+ it('should extract query pairs from complex query with IN operator without brackets', () => {
const input =
"service.name IN 'adservice' AND cloud.account.id = 'signoz-staging' code.lineno < 172";
const result = extractQueryPairs(input);
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{
key: 'service.name',
operator: 'IN',
@@ -362,7 +362,7 @@ describe('extractQueryPairs', () => {
]);
});
- test('should handle recursion guard', () => {
+ it('should handle recursion guard', () => {
// This test verifies the recursion protection in the function
// We'll mock the function to simulate recursion
@@ -379,7 +379,7 @@ describe('extractQueryPairs', () => {
consoleSpy.mockRestore();
});
- test('should treat lowercase exists as non-value operator', () => {
+ it('should treat lowercase exists as non-value operator', () => {
const input = 'body exists service.name contains "test"';
const result = extractQueryPairs(input);
@@ -387,18 +387,18 @@ describe('extractQueryPairs', () => {
expect(result[0].key).toBe('body');
expect(result[0].operator).toBe('exists');
expect(result[0].value).toBeUndefined();
- expect(result[0].valuesPosition).toEqual([]);
+ expect(result[0].valuesPosition).toStrictEqual([]);
expect(result[0].isComplete).toBe(false);
expect(result[1].key).toBe('service.name');
expect(result[1].operator).toBe('contains');
expect(result[1].value).toBe('"test"');
- expect(result[1].valuesPosition).toEqual([]);
+ expect(result[1].valuesPosition).toStrictEqual([]);
expect(result[1].isComplete).toBe(true);
});
});
describe('createContext', () => {
- test('should create a context object with all parameters', () => {
+ it('should create a context object with all parameters', () => {
const mockToken = {
type: 29,
text: 'test',
@@ -419,7 +419,7 @@ describe('createContext', () => {
null, // currentPair
);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
tokenType: 29,
text: 'test',
start: 0,
@@ -440,7 +440,7 @@ describe('createContext', () => {
});
});
- test('should create a context object with minimal parameters', () => {
+ it('should create a context object with minimal parameters', () => {
const mockToken = {
type: 29,
text: 'test',
@@ -450,7 +450,7 @@ describe('createContext', () => {
const result = createContext(mockToken as any, false, false, false, false);
- expect(result).toEqual({
+ expect(result).toStrictEqual({
tokenType: 29,
text: 'test',
start: 0,
@@ -473,7 +473,7 @@ describe('createContext', () => {
});
describe('getCurrentValueIndexAtCursor', () => {
- test('should return correct value index when cursor is within a value range', () => {
+ it('should return correct value index when cursor is within a value range', () => {
const valuesPosition = [
{ start: 0, end: 10 },
{ start: 15, end: 25 },
@@ -485,7 +485,7 @@ describe('getCurrentValueIndexAtCursor', () => {
expect(result).toBe(1);
});
- test('should return null when cursor is not within any value range', () => {
+ it('should return null when cursor is not within any value range', () => {
const valuesPosition = [
{ start: 0, end: 10 },
{ start: 15, end: 25 },
@@ -496,7 +496,7 @@ describe('getCurrentValueIndexAtCursor', () => {
expect(result).toBeNull();
});
- test('should return correct index when cursor is at the boundary', () => {
+ it('should return correct index when cursor is at the boundary', () => {
const valuesPosition = [
{ start: 0, end: 10 },
{ start: 15, end: 25 },
@@ -507,7 +507,7 @@ describe('getCurrentValueIndexAtCursor', () => {
expect(result).toBe(0);
});
- test('should return null for empty valuesPosition array', () => {
+ it('should return null for empty valuesPosition array', () => {
const result = getCurrentValueIndexAtCursor([], 5);
expect(result).toBeNull();
@@ -515,7 +515,7 @@ describe('getCurrentValueIndexAtCursor', () => {
});
describe('getCurrentQueryPair', () => {
- test('should return the correct query pair at cursor position', () => {
+ it('should return the correct query pair at cursor position', () => {
const queryPairs = [
{
key: 'a',
@@ -550,10 +550,10 @@ describe('getCurrentQueryPair', () => {
const query = 'a = 1 AND b = 2';
const result = getCurrentQueryPair(queryPairs, query, 15);
- expect(result).toEqual(queryPairs[1]);
+ expect(result).toStrictEqual(queryPairs[1]);
});
- test('should return null when no pairs match cursor position', () => {
+ it('should return null when no pairs match cursor position', () => {
const queryPairs = [
{
key: 'a',
@@ -578,13 +578,13 @@ describe('getCurrentQueryPair', () => {
expect(result).toBeNull();
});
- test('should return null for empty queryPairs array', () => {
+ it('should return null for empty queryPairs array', () => {
const result = getCurrentQueryPair([], 'test query', 5);
expect(result).toBeNull();
});
- test('should return last pair when cursor is at the end', () => {
+ it('should return last pair when cursor is at the end', () => {
const queryPairs = [
{
key: 'a',
@@ -605,6 +605,6 @@ describe('getCurrentQueryPair', () => {
const query = 'a = 1';
const result = getCurrentQueryPair(queryPairs, query, 5);
- expect(result).toEqual(queryPairs[0]);
+ expect(result).toStrictEqual(queryPairs[0]);
});
});
diff --git a/frontend/src/utils/__tests__/sanitizeOrderBy.test.ts b/frontend/src/utils/__tests__/sanitizeOrderBy.test.ts
index d53c7346d0..1ab6c4fd13 100644
--- a/frontend/src/utils/__tests__/sanitizeOrderBy.test.ts
+++ b/frontend/src/utils/__tests__/sanitizeOrderBy.test.ts
@@ -88,7 +88,7 @@ describe('sanitizeOrderByForExplorer', () => {
const result = sanitizeOrderByForExplorer(query);
- expect(result).toEqual([
+ expect(result).toStrictEqual([
{ columnName: 'service.name', order: 'asc' },
{ columnName: 'count()', order: 'desc' },
{ columnName: 'avg(duration)', order: 'asc' },
@@ -116,7 +116,7 @@ describe('sanitizeOrderByForExplorer', () => {
});
const result = sanitizeOrderByForExplorer(query);
- expect(result).toEqual([]);
+ expect(result).toStrictEqual([]);
});
it('handles missing orderBy by returning an empty array', () => {
@@ -124,6 +124,6 @@ describe('sanitizeOrderByForExplorer', () => {
const query = buildQuery({ orderBy: [] });
const result = sanitizeOrderByForExplorer(query);
- expect(result).toEqual([]);
+ expect(result).toStrictEqual([]);
});
});
diff --git a/frontend/src/utils/__tests__/spanToTree.test.ts b/frontend/src/utils/__tests__/spanToTree.test.ts
index 4cf7a20fb4..5dc3163be4 100644
--- a/frontend/src/utils/__tests__/spanToTree.test.ts
+++ b/frontend/src/utils/__tests__/spanToTree.test.ts
@@ -2,20 +2,20 @@ import { TraceData } from '../fixtures/TraceData';
import { spanToTreeUtil } from '../spanToTree';
describe('utils/spanToTree', () => {
- test('should return a single tree on valid trace data', () => {
+ it('should return a single tree on valid trace data', () => {
const spanTree = spanToTreeUtil(TraceData);
- expect(spanTree.spanTree.length).toBe(1);
- expect(spanTree.missingSpanTree.length).toBe(0);
+ expect(spanTree.spanTree).toHaveLength(1);
+ expect(spanTree.missingSpanTree).toHaveLength(0);
expect(spanTree).toMatchSnapshot();
});
- test('should return a single tree on valid trace data', () => {
+ it('should return a single tree on valid trace data', () => {
const MissingTraceData = [...TraceData];
MissingTraceData.splice(1, 1);
const spanTree = spanToTreeUtil(MissingTraceData);
- expect(spanTree.spanTree.length).toBe(1);
- expect(spanTree.missingSpanTree.length).toBe(1);
+ expect(spanTree.spanTree).toHaveLength(1);
+ expect(spanTree.missingSpanTree).toHaveLength(1);
expect(spanTree).toMatchSnapshot();
});
});
diff --git a/frontend/src/utils/timeUtils.ts b/frontend/src/utils/timeUtils.ts
index 60133ac7d0..ce92600ad0 100644
--- a/frontend/src/utils/timeUtils.ts
+++ b/frontend/src/utils/timeUtils.ts
@@ -37,7 +37,7 @@ export const getRemainingDays = (billingEndDate: number): number => {
const endDate = new Date(billingEndDate * 1000); // Convert seconds to milliseconds
// Calculate the time difference in milliseconds
- // @ts-ignore
+ // @ts-expect-error
const timeDifference = endDate - startDate;
return Math.ceil(timeDifference / (1000 * 60 * 60 * 24));
diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json
index 613758fa26..1e6ea35293 100644
--- a/frontend/tsconfig.json
+++ b/frontend/tsconfig.json
@@ -34,7 +34,6 @@
"./src/*"
]
},
- "downlevelIteration": true,
"plugins": [
{
"name": "typescript-plugin-css-modules"
diff --git a/frontend/yarn.lock b/frontend/yarn.lock
index b3337eb796..d4efb75805 100644
--- a/frontend/yarn.lock
+++ b/frontend/yarn.lock
@@ -4216,225 +4216,225 @@
resolved "https://registry.yarnpkg.com/@oxc-project/types/-/types-0.101.0.tgz#5692200d09d6f87341eac3f8e70e403173c5283e"
integrity sha512-nuFhqlUzJX+gVIPPfuE6xurd4lST3mdcWOhyK/rZO0B9XWMKm79SuszIQEnSMmmDhq1DC8WWVYGVd+6F93o1gQ==
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-android-arm-eabi/-/binding-android-arm-eabi-0.46.0.tgz#d2da704ab6c741e535de3445d0994290b77b3fc0"
- integrity sha512-b1doV4WRcJU+BESSlCvCjV+5CEr/T6h0frArAdV26Nir+gGNFNaylvDiiMPfF1pxeV0txZEs38ojzJaxBYg+ng==
-
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-android-arm64/-/binding-android-arm64-0.46.0.tgz#203341eaf489c325a01e247c6209f13f39f0777f"
- integrity sha512-v6+HhjsoV3GO0u2u9jLSAZrvWfTraDxKofUIQ7/ktS7tzS+epVsxdHmeM+XxuNcAY/nWxxU1Sg4JcGTNRXraBA==
-
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-darwin-arm64/-/binding-darwin-arm64-0.46.0.tgz#ce653c87e00305c84edb380ecac3db789c3ea9a4"
- integrity sha512-3eeooJGrqGIlI5MyryDZsAcKXSmKIgAD4yYtfRrRJzXZ0UTFZtiSveIur56YPrGMYZwT4XyVhHsMqrNwr1XeFA==
-
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-darwin-x64/-/binding-darwin-x64-0.46.0.tgz#71016678036fab249172c763d2f59a3535f0fe91"
- integrity sha512-QG8BDM0CXWbu84k2SKmCqfEddPQPFiBicwtYnLqHRWZZl57HbtOLRMac/KTq2NO4AEc4ICCBpFxJIV9zcqYfkQ==
-
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-freebsd-x64/-/binding-freebsd-x64-0.46.0.tgz#fd939be2e39c29fead415f41c70eb52f94d53d6a"
- integrity sha512-9DdCqS/n2ncu/Chazvt3cpgAjAmIGQDz7hFKSrNItMApyV/Ja9mz3hD4JakIE3nS8PW9smEbPWnb389QLBY4nw==
-
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.46.0.tgz#09f4f3894e140340256a02665832bdcf66d8b5c3"
- integrity sha512-Dgs7VeE2jT0LHMhw6tPEt0xQYe54kBqHEovmWsv4FVQlegCOvlIJNx0S8n4vj8WUtpT+Z6BD2HhKJPLglLxvZg==
-
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.46.0.tgz#35ca79c2c643dd5dd7eb1e1c0cbc5205eecba8ee"
- integrity sha512-Zxn3adhTH13JKnU4xXJj8FeEfF680XjXh3gSShKl57HCMBRde2tUJTgogV/1MSHA80PJEVrDa7r66TLVq3Ia7Q==
-
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.46.0.tgz#5f30f09b2d109ec18f1d9de64414718f4c9975be"
- integrity sha512-+TWipjrgVM8D7aIdDD0tlr3teLTTvQTn7QTE5BpT10H1Fj82gfdn9X6nn2sDgx/MepuSCfSnzFNJq2paLL0OiA==
-
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.46.0.tgz#a550718469f40dcb8a382eb5a89b031d7f47ee16"
- integrity sha512-aAUPBWJ1lGwwnxZUEDLJ94+Iy6MuwJwPxUgO4sCA5mEEyDk7b+cDQ+JpX1VR150Zoyd+D49gsrUzpUK5h587Eg==
-
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.46.0.tgz#51d25e82d6c965aa09660ef31a19e6d8a79253a9"
- integrity sha512-ufBCJukyFX/UDrokP/r6BGDoTInnsDs7bxyzKAgMiZlt2Qu8GPJSJ6Zm6whIiJzKk0naxA8ilwmbO1LMw6Htxw==
-
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.46.0.tgz#02565fd79a18de150f9a76a00f76fdd3a5e7f0fa"
- integrity sha512-eqtlC2YmPqjun76R1gVfGLuKWx7NuEnLEAudZ7n6ipSKbCZTqIKSs1b5Y8K/JHZsRpLkeSmAAjig5HOIg8fQzQ==
-
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.46.0.tgz#d148eb5b52a0c96ce90361ed733443df2f03e5c5"
- integrity sha512-yccVOO2nMXkQLGgy0He3EQEwKD7NF0zEk+/OWmroznkqXyJdN6bfK0LtNnr6/14Bh3FjpYq7bP33l/VloCnxpA==
-
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.46.0.tgz#22cbee991e79147e7a0d5db2cc9aa74bf5bd6d89"
- integrity sha512-aAf7fG23OQCey6VRPj9IeCraoYtpgtx0ZyJ1CXkPyT1wjzBE7c3xtuxHe/AdHaJfVVb/SXpSk8Gl1LzyQupSqw==
-
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.46.0.tgz#35fdda5137b108ec5cc0a8656a04fabdd0edd652"
- integrity sha512-q0JPsTMyJNjYrBvYFDz4WbVsafNZaPCZv4RnFypRotLqpKROtBZcEaXQW4eb9YmvLU3NckVemLJnzkSZSdmOxw==
-
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-x64-musl/-/binding-linux-x64-musl-0.46.0.tgz#dc399b372b27b26534d516a5a68927843f400603"
- integrity sha512-7LsLY9Cw57GPkhSR+duI3mt9baRczK/DtHYSldQ4BEU92da9igBQNl4z7Vq5U9NNPsh1FmpKvv1q9WDtiUQR1A==
-
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-openharmony-arm64/-/binding-openharmony-arm64-0.46.0.tgz#b7c89ecd6e1827dca86779f4d08dc200bad5915c"
- integrity sha512-lHiBOz8Duaku7JtRNLlps3j++eOaICPZSd8FCVmTDM4DFOPT71Bjn7g6iar1z7StXlKRweUKxWUs4sA+zWGDXg==
-
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.46.0.tgz#ec0ea70875374bf0a1c949bac6a2177e23425bb8"
- integrity sha512-/5ktYUliP89RhgC37DBH1x20U5zPSZMy3cMEcO0j3793rbHP9MWsknBwQB6eozRzWmYrh0IFM/p20EbPvDlYlg==
-
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.46.0.tgz#fa7b6bf31602c814ffdd8e3bfad355569b2f08da"
- integrity sha512-3WTnoiuIr8XvV0DIY7SN+1uJSwKf4sPpcbHfobcRT9JutGcLaef/miyBB87jxd3aqH+mS0+G5lsgHuXLUwjjpQ==
-
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/@oxfmt/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.46.0.tgz#0ddd94829568c94101abe88896e48f724891e4f2"
- integrity sha512-IXxiQpkYnOwNfP23vzwSfhdpxJzyiPTY7eTn6dn3DsriKddESzM8i6kfq9R7CD/PUJwCvQT22NgtygBeug3KoA==
-
-"@oxlint-tsgolint/[email protected]":
- version "0.21.1"
- resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/darwin-arm64/-/darwin-arm64-0.21.1.tgz#b4390b047d246608b130e2bde238306659c2b292"
- integrity sha512-7TLjyWe4wG9saJc992VWmaHq2hwKfOEEVTjheReXJXaDhavMZI4X9a6nKhbEng4IVkYtzjD2jw16vw2WFXLYLw==
-
-"@oxlint-tsgolint/[email protected]":
- version "0.21.1"
- resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/darwin-x64/-/darwin-x64-0.21.1.tgz#18f607e47c04459962d2ddf1461491f5690c3f8f"
- integrity sha512-7wf9Wf75nTzA7zpL9myhFe2RKvfuqGUOADNvUooCjEWvh7hmPz3lSEqTMh5Z/VQhzsG04mM9ACyghxhRzq7zFw==
-
-"@oxlint-tsgolint/[email protected]":
- version "0.21.1"
- resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/linux-arm64/-/linux-arm64-0.21.1.tgz#da5932c940362faa261c67085c9eb215a8f48bab"
- integrity sha512-IPuQN/Vd0Rjklg/cCGBbQyUuRBp2f6LQXpZYwk5ivOR6V/+CgiYsv8pn/PVY7gjeyoNvPQrXB7xMjHUO2YZbdw==
-
-"@oxlint-tsgolint/[email protected]":
- version "0.21.1"
- resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/linux-x64/-/linux-x64-0.21.1.tgz#26c916b25c852bb63c9bd95f61bd0228400ddef0"
- integrity sha512-d1niGuTbh2qiv7dR7tqkbOcM5cIR63of0lMBFdEQavL1KrJV8zuRdwdi68K7MNGdgoR+J5A9ajpGGvsHwp1bPg==
-
-"@oxlint-tsgolint/[email protected]":
- version "0.21.1"
- resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/win32-arm64/-/win32-arm64-0.21.1.tgz#c6e78be4394f29abd9106137c5f0a9e7ee4e0d97"
- integrity sha512-ICu9y2JLnFPvFqstnWPPNqBM8LK8BWw2OTeaR0UgEMm4hOSbrZAKv1/hwZYyiLqnCNjBL87AGSQIgTHCYlsipw==
-
-"@oxlint-tsgolint/[email protected]":
- version "0.21.1"
- resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/win32-x64/-/win32-x64-0.21.1.tgz#e0ff1eebe8837effe74af3f76c9ae6afc8992e58"
- integrity sha512-cTEFCFjCj6iXfrSHcvajSPNqhEA4TxSzU3gFxbdGSAUTNXGToU99IbdhWAPSbhcucoym0XE4Zl7E41NiSkNTug==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.61.0.tgz#c7a8fb22ac3084d6f4c873cdc9779f4f9e38b805"
- integrity sha512-6eZBPgiigK5txqoVgRqxbaxiom4lM8AP8CyKPPvpzKnQ3iFRFOIDc+0AapF+qsUSwjOzr5SGk4SxQDpQhkSJMQ==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-android-arm64/-/binding-android-arm64-1.61.0.tgz#5fe7c707e12513ede292da015d13e93781771e9f"
- integrity sha512-CkwLR69MUnyv5wjzebvbbtTSUwqLxM35CXE79bHqDIK+NtKmPEUpStTcLQRZMCo4MP0qRT6TXIQVpK0ZVScnMA==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.61.0.tgz#1f58a4c592b76e293e5b9072cc0e4e7a5bef8191"
- integrity sha512-8JbefTkbmvqkqWjmQrHke+MdpgT2UghhD/ktM4FOQSpGeCgbMToJEKdl9zwhr/YWTl92i4QI1KiTwVExpcUN8A==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.61.0.tgz#eade7425cc943c3146f3e0f0fb4d08d615ee78a9"
- integrity sha512-uWpoxDT47hTnDLcdEh5jVbso8rlTTu5o0zuqa9J8E0JAKmIWn7kGFEIB03Pycn2hd2vKxybPGLhjURy/9We5FQ==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.61.0.tgz#8d82382a07ce4895c91694a810dee7f39866951b"
- integrity sha512-K/o4hEyW7flfMel0iBVznmMBt7VIMHGdjADocHKpK1DUF9erpWnJ+BSSWd2W0c8K3mPtpph+CuHzRU6CI3l9jQ==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.61.0.tgz#df76a5700651cda73ca5578de7308f9479b7cb1b"
- integrity sha512-P6040ZkcyweJ0Po9yEFqJCdvZnf3VNCGs1SIHgXDf8AAQNC6ID/heXQs9iSgo2FH7gKaKq32VWc59XZwL34C5Q==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.61.0.tgz#b198e5697cfb6cc55eff5ab5b9766732e143492d"
- integrity sha512-bwxrGCzTZkuB+THv2TQ1aTkVEfv5oz8sl+0XZZCpoYzErJD8OhPQOTA0ENPd1zJz8QsVdSzSrS2umKtPq4/JXg==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.61.0.tgz#a5cdae7ef9f9b79526ef764fb174bb362c3737ee"
- integrity sha512-vkhb9/wKguMkLlrm3FoJW/Xmdv31GgYAE+x8lxxQ+7HeOxXUySI0q36a3NTVIuQUdLzxCI1zzMGsk1o37FOe3w==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.61.0.tgz#227f6d94a3c00140a88ea338436783bd9da6f4ae"
- integrity sha512-bl1dQh8LnVqsj6oOQAcxwbuOmNJkwc4p6o//HTBZhNTzJy21TLDwAviMqUFNUxDHkPGpmdKTSN4tWTjLryP8xg==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.61.0.tgz#e504e6cd8691fe460b202599d4c962fc7ad98f94"
- integrity sha512-QoOX6KB2IiEpyOj/HKqaxi+NQHPnOgNgnr22n9N4ANJCzXkUlj1UmeAbFb4PpqdlHIzvGDM5xZ0OKtcLq9RhiQ==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.61.0.tgz#efe70d9e570756fe19fb60d05a39dd58e9e0f32d"
- integrity sha512-1TGcTerjY6p152wCof3oKElccq3xHljS/Mucp04gV/4ATpP6nO7YNnp7opEg6SHkv2a57/b4b8Ndm9znJ1/qAw==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.61.0.tgz#f9c42095192f235b03a5d3d1f1fbfb45002d5a93"
- integrity sha512-65wXEmZIrX2ADwC8i/qFL4EWLSbeuBpAm3suuX1vu4IQkKd+wLT/HU/BOl84kp91u2SxPkPDyQgu4yrqp8vwVA==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.61.0.tgz#23773cd6f8087f98c54383caccb98808fab6cca0"
- integrity sha512-TVvhgMvor7Qa6COeXxCJ7ENOM+lcAOGsQ0iUdPSCv2hxb9qSHLQ4XF1h50S6RE1gBOJ0WV3rNukg4JJJP1LWRA==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.61.0.tgz#f46b036cf74b382c03f6a00e18cd1ae53096517f"
- integrity sha512-SjpS5uYuFoDnDdZPwZE59ndF95AsY47R5MliuneTWR1pDm2CxGJaYXbKULI71t5TVfLQUWmrHEGRL9xvuq6dnA==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.61.0.tgz#cff6c4c24de0863cecbce1c1f43adcafacd9011d"
- integrity sha512-gGfAeGD4sNJGILZbc/yKcIimO9wQnPMoYp9swAaKeEtwsSQAbU+rsdQze5SBtIP6j0QDzeYd4XSSUCRCF+LIeQ==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.61.0.tgz#9fdd87fc10c2c51c510470f7c4136ab2df9ee7b3"
- integrity sha512-OlVT0LrG/ct33EVtWRyR+B/othwmDWeRxfi13wUdPeb3lAT5TgTcFDcfLfarZtzB4W1nWF/zICMgYdkggX2WmQ==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.61.0.tgz#25a87f62859a6703f2520d665f98f6c0f88a70e0"
- integrity sha512-vI//NZPJk6DToiovPtaiwD4iQ7kO1r5ReWQD0sOOyKRtP3E2f6jxin4uvwi3OvDzHA2EFfd7DcZl5dtkQh7g1w==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.61.0.tgz#06f7df42b074f28ef27540d38be69875e5d5afcb"
- integrity sha512-0ySj4/4zd2XjePs3XAQq7IigIstN4LPQZgCyigX5/ERMLjdWAJfnxcTsrtxZxuij8guJW8foXuHmhGxW0H4dDA==
-
-"@oxlint/[email protected]":
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.61.0.tgz#7bc84b261bb8b515ade20f1044547cc8bbee44ce"
- integrity sha512-0xgSiyeqDLDZxXoe9CVJrOx3TUVsfyoOY7cNi03JbItNcC9WCZqrSNdrAbHONxhSPaVh/lzfnDcON1RqSUMhHw==
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-android-arm-eabi/-/binding-android-arm-eabi-0.47.0.tgz#5516a2c695e6d45829b2c98a01d9528b0b6e61a0"
+ integrity sha512-KrMQRdMi/upr81qT4ijK6X6BNp6jqpMY7FwILQnwIy9QLc3qpnhUx5rsCLGzn4ewsCQ0CNAspN2ogmP1GXLyLw==
+
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-android-arm64/-/binding-android-arm64-0.47.0.tgz#85ea358f46a73f2485343fe12c5223fdb50c069d"
+ integrity sha512-r4ixS/PeUpAFKgrpDoZ5pSkthjZzVzKd95525Aazj+aOv9H4ulK5zYHGb7wFY5n5kZxHK8TbOJUZgoEb1ohddQ==
+
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-darwin-arm64/-/binding-darwin-arm64-0.47.0.tgz#90c757ac8d87b4ede92965aec61eac94e47ff6dd"
+ integrity sha512-CLWxiKpMl+195cm09CuaWEhJK0CirRkoMa07aR9+9AFPat2LfIKtwx1JqxZM0MTvcMe6+adlJNdVL6jdInvq3g==
+
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-darwin-x64/-/binding-darwin-x64-0.47.0.tgz#1ebcf47ed790e31441e73ecaeee441f6ab0fe0fb"
+ integrity sha512-Xq5fjTYDC50faUeLSm0rZdBqoTgleXEdD7NpJdARtQIczkCJn3xNjMUSQQkUmh4CtxkKTNL68lytcOK3e/osgg==
+
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-freebsd-x64/-/binding-freebsd-x64-0.47.0.tgz#99eaea7abd9ba897b697eabcffc1c475e78cb6b7"
+ integrity sha512-QOU9ZIJ52p5askcEC0QJvvr8trHAWoonul8bgISo6gYUL3s50zkqafBYcNAr9LJZQbsZtPfIWHk9+5+nUp1qJQ==
+
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.47.0.tgz#9166b54e49e3311f1337ed085ddea7884def2762"
+ integrity sha512-oJxDM1aBhPvz9gmElBv8UpxyiqhwfjcbrSxT5F0xtuUzY6dQI27/AQPIt3eu3Z5Yvn0kQl5R7MA3Z+MbnRvCBw==
+
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.47.0.tgz#665bd22db9a926533e1c22354a6f516a1151ecac"
+ integrity sha512-g8Lh50VS4ibGz2q6v7r9UZY4D0dM16SdrFYOMzhqIoCwGcai8VMIRUAcqn1/jlCsOOzUXJ741+kCeJt0cofakQ==
+
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.47.0.tgz#b6f1a0c40557397ec4ad79727bae16636c76c411"
+ integrity sha512-YrNT1vQ0asaXoRbrvYENPqmBfOQ9Xr8enPNOULeYfg44VjCcrUowFy5QZr+WawE0zyP8cH9e9Gxxg0fDEFzhcg==
+
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.47.0.tgz#9617da44d91b4bb0a679ec1504eb0aa0c919fbb1"
+ integrity sha512-IxtQC/sbBi4ubbY+MdwdanRWrG9InQJVZqyMsBa5IUaQcnSg86gQme574HxXMC1p4bo4YhV99zQ+wNnGCvEgzw==
+
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.47.0.tgz#6e672e383178bd0a90b5685d9e513d60a66ba818"
+ integrity sha512-EWXEhOMbWO0q6eJSbu0QLkU8cKi0ljlYLngeDs2Ocu/pm1rrLwyQiYzlFbdnMRURI4w9ndr1sI9rSbhlJ5o23Q==
+
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.47.0.tgz#68563084137eb3ca353af0d55739fdbf49a667a0"
+ integrity sha512-tZrjS11TUiDuEpRaqdk8K9F9xETRyKXfuZKmdeW+Gj7coBnm7+8sBEfyt033EAFEQSlkniAXvBLh+Qja2ioGBQ==
+
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.47.0.tgz#6a2f0d5f159d86e16691753a49c7e78027e8e568"
+ integrity sha512-KBFy+2CFKUCZzYwX2ZOPQKck1vjQbz+hextuc19G4r0WRJwadfAeuQMQRQvB+Ivc8brlbOVg7et8K7E467440g==
+
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.47.0.tgz#888c1e9db152c68e51ebe3c4b21a8c2fc5331f07"
+ integrity sha512-REUPFKVGSiK99B+9eaPhluEVglzaoj/SMykNC5SUiV2RSsBfV5lWN7Y0iCIc251Wz3GaeAGZsJ/zj3gjarxdFg==
+
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.47.0.tgz#8a279adaa8a404acc661b5ba915cc72ac6e15626"
+ integrity sha512-KVftVSVEDeIfRW3TIeLe3aNI/iY4m1fu5mDwHcisKMZSCMKLkrhFsjowC7o9RoqNPxbbglm2+/6KAKBIts2t0Q==
+
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-linux-x64-musl/-/binding-linux-x64-musl-0.47.0.tgz#e8ecc62fd533255298f316f64ed1d25553ea147d"
+ integrity sha512-DTsmGEaA2860Aq5VUyDO8/MT9NFxwVL93RnRYmpMwK6DsSkThmvEpqoUDDljziEpAedMRG19SCogrNbINSbLUQ==
+
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-openharmony-arm64/-/binding-openharmony-arm64-0.47.0.tgz#96ee2865d75c0fc8a65416ad8866218ba47c394d"
+ integrity sha512-8r5BDro7fLOBoq1JXHLVSs55OlrxQhEso4HVo0TcY7OXJUPYfjPoOaYL5us+yIwqyP9rQwN+rxuiNFSmaxSuOQ==
+
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.47.0.tgz#ca4025455656510653c8491809efa83cb5c0cb70"
+ integrity sha512-qtz/gzm8IjSPUlseZ0ofW8zyHLoZsuP5HTfcGGkWkUblB89JT8GNYH3ICqjbDsqsGqXum0/ZndXTFplSdXFIcg==
+
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.47.0.tgz#66a3379214661b6a738da74ea5fd09ce4d55390c"
+ integrity sha512-5vIcdcIDE7nCx+MXN6sm8kbC4zajDB31E86rez4i45iHNH/2NjdKlJ720xcHTr3eeiMcttCGPHPhE1TjtBDGZw==
+
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/@oxfmt/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.47.0.tgz#ad962adfc251270125f98b107a985d1365ce6b07"
+ integrity sha512-Sr59Y5ms54ONBjxFeWhVlGyQcHXxcl9DxC23f6yXlRkcos7LXBLoO+KDfxexjHIOZh7cWqrWduzvUjJ+pHp8cQ==
+
+"@oxlint-tsgolint/[email protected]":
+ version "0.22.1"
+ resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/darwin-arm64/-/darwin-arm64-0.22.1.tgz#02bf38e8f91e276c01d93c590f0ba843d12ab000"
+ integrity sha512-4150Lpgc1YM09GcjA6GSrra1JoPjC7aOpfywLjWEY4vW0Sd1qKzqHF1WRaiw0/qUZ40OATYdv3aRd7ipPkWQbw==
+
+"@oxlint-tsgolint/[email protected]":
+ version "0.22.1"
+ resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/darwin-x64/-/darwin-x64-0.22.1.tgz#fe5ef6548a6ee016fb4827b80f205d940c4f3f08"
+ integrity sha512-vFWcPWYOgZs4HWcgS1EjUZg33NLcNfEYU49KGImmCfZWkflENrmBYV4HN/C0YeAPum6ZZ/goPSvQrB/cOD+NfA==
+
+"@oxlint-tsgolint/[email protected]":
+ version "0.22.1"
+ resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/linux-arm64/-/linux-arm64-0.22.1.tgz#e8262db8794275bbbea9630cd9d6ebcbd190e38c"
+ integrity sha512-6LiUpP0Zir3+29FvBm7Y28q/dBjSHqTZ5MhG1Ckw4fGhI4cAvbcwXaKvbjx1TP7rRmBNOoq/M5xdpHjTb+GAew==
+
+"@oxlint-tsgolint/[email protected]":
+ version "0.22.1"
+ resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/linux-x64/-/linux-x64-0.22.1.tgz#848b7a2062826511252a003cdcf01e6ab3ae3fd5"
+ integrity sha512-fuX1hEQfpHauUbXADsfqVhRzrUrGabzGXbj5wsp2vKhV5uk/Rze8Mba9GdjFGECzvXudMGqHqxB4r6jGRdhxVA==
+
+"@oxlint-tsgolint/[email protected]":
+ version "0.22.1"
+ resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/win32-arm64/-/win32-arm64-0.22.1.tgz#9e046b04251b6d9c40eddf985cd72a23a635c7bd"
+ integrity sha512-8SZidAj+jrbZf9ZjBEYW0tiNZ+KasqB2zgW26qdiPpQSF/DzURnPmXz651IeA9YsmbVdHGIooEHUmev6QJdquA==
+
+"@oxlint-tsgolint/[email protected]":
+ version "0.22.1"
+ resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/win32-x64/-/win32-x64-0.22.1.tgz#fb1999770b62dc42996593ee30a488df6c5b6c60"
+ integrity sha512-QweSk9H5lFh5Y+WUf2Kq/OAN88V6+62ZwGhP38gqdRotI90luXSMkruFTj7Q2rYrzH4ZVNaSqx7NY8JpSfIzqg==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.62.0.tgz#4b13c0a80392e45a466099d9bcd2861887658565"
+ integrity sha512-pKsthNECyvJh8lPTICz6VcwVy2jOqdhhsp1rlxCkhgZR47aKvXPmaRWQDv+zlXpRae4qm1MaaTnutkaOk5aofg==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-android-arm64/-/binding-android-arm64-1.62.0.tgz#f79cbc4e8e10d0c03bea45f12371d92c1b1fb184"
+ integrity sha512-b1AUNViByvgmR2xJDubvLIr+dSuu3uraG7bsAoKo+xrpspPvu6RIn6Fhr2JUhobfep3jwUTy18Huco6GkwdvGQ==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.62.0.tgz#cbb84d6903ca40221aa5447c919f5e831949df3d"
+ integrity sha512-iG+Tvf70UJ6otfwFYIHk36Sjq9cpPP5YLxkoggANNRtzgi3Tj3g8q6Ybqi6AtkU3+yg9QwF7bDCkCS6bbL4PCg==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.62.0.tgz#3f06184754e8bffb96b7218257f3440f5e58f681"
+ integrity sha512-oOWI6YPPr5AJUx+yIDlxmuUbQjS5gZX3OH3QisawYvsZgLiQVvZtR0rPBcJTxLWqt2ClrWg0DlSrlUiG5SQNHg==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.62.0.tgz#240a17efea5f5c0edb006acc269751dcd99579ec"
+ integrity sha512-dLP33T7VLCmLVv4cvjkVX+rmkcwNk2UfxmsZPNur/7BQHoQR60zJ7XLiRvNUawlzn0u8ngCa3itjEG73MAMa/w==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.62.0.tgz#7dda9ca87f3bdc3f575a1c26189e37d1a9e37970"
+ integrity sha512-fl//LWNks6qo9chNY60UDYyIwtp7a5cEx4Y/rHPjaarhuwqx6jtbzEpD5V5AqmdL4a6Y5D8zeXg5HF2Cr0QmSQ==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.62.0.tgz#a1e1e292ab90fd54f6af7dd15a5b067b1577c0e8"
+ integrity sha512-i5vkAuxvueTODV3J2dL61/TXewDHhMFKvtD156cIsk7GsdfiAu7zW7kY0NJXhKeFHeiMZIh7eFNjkPYH6J47HQ==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.62.0.tgz#c98592a1d53be7dda9b8a58f3707fe7be2cdc027"
+ integrity sha512-QwN19LLuIGuOjEflSeJkZmOTfBdBMlTmW8xbMf8TZhjd//cxVNYQPq75q7oKZBJc6hRx3gY7sX0Egc8cEIFZYg==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.62.0.tgz#d9fbd4e8538b60c9b1dd87ffa5d132b6a5d3de56"
+ integrity sha512-8eCy3FCDuWUM5hWujAv6heMvfZPbcCOU3SdQUAkixZLu5bSzOkNfirJiLGoQFO943xceOKkiQRMQNzH++jM3WA==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.62.0.tgz#b417ea16f901a2e16fce7523993533fa9ff30eac"
+ integrity sha512-NjQ7K7tpTPDe9J+yq8p/s/J0E7lRCkK2uDBDqvT4XIT6f4Z0tlnr59OBg/WcrmVHER1AbrcfyxhGTXgcG8ytWg==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.62.0.tgz#a4e12361d1b72164f454ac6517302721b8dab45a"
+ integrity sha512-oKZed9gmSwze29dEt3/Wnsv6l/Ygw/FUst+8Kfpv2SGeS/glEoTGZAMQw37SVyzFV76UTHJN2snGgxK2t2+8ow==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.62.0.tgz#f3a9e825d95360c03048d1d9117a1c2c1f1f547b"
+ integrity sha512-gBjBxQ+9lGpAYq+ELqw0w8QXsBnkZclFc7GRX2r0LnEVn3ZTEqeIKpKcGjucmp76Q53bvJD0i4qBWBhcfhSfGA==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.62.0.tgz#39c4b7769f7847b5d806fd7ed9b67dfbd05dc75c"
+ integrity sha512-Ew2Kxs9EQ9/mbAIJ2hvocMC0wsOu6YKzStI2eFBDt+Td5O8seVC/oxgRIHqCcl5sf5ratA1nozQBAuv7tphkHg==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.62.0.tgz#73883d8f4096fc7560a8a82d64c3dc8c8d94c392"
+ integrity sha512-5z25jcAA0gfKyVwz71A0VXgaPlocPoTAxhlv/hgoK6tlCrfoNuw7haWbDHvGMfjXhdic4EqVXGRv5XsTqFnbRQ==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.62.0.tgz#8ea90209143c1d565384efc486d6e26c5b0d2b29"
+ integrity sha512-IWpHmMB6ZDllPvqWDkG6AmXrN7JF5e/c4g/0PuURsmlK+vHoYZPB70rr4u1bn3I4LsKCSpqqfveyx6UCOC8wdg==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.62.0.tgz#bdbea8d2132eea6887696bc64d2579b20909d29a"
+ integrity sha512-fjlSxxrD5pA594vkyikCS9MnPRjQawW6/BLgyTYkO+73wwPlYjkcZ7LSd974l0Q2zkHQmu4DPvJFLYA7o8xrxQ==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.62.0.tgz#fc219c7a1c6e4dfd59194837f0f513622f60962d"
+ integrity sha512-EiFXr8loNS0Ul3Gu80+9nr1T8jRmnKocqmHHg16tj5ZqTgUXyb97l2rrspVHdDluyFn9JfR4PoJFdNzw4paHww==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.62.0.tgz#b735294b07c0e2803fcb7a09426e135d1030ed3d"
+ integrity sha512-IgOFvL73li1bFgab+hThXYA0N2Xms2kV2MvZN95cebV+fmrZ9AVui1JSxfeeqRLo3CpPxKZlzhyq4G0cnaAvIw==
+
+"@oxlint/[email protected]":
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.62.0.tgz#872115161dcac8d91b45e624b3a2dd01ad24747a"
+ integrity sha512-6hMpyDWQ2zGA1OXFKBrdYMUveUCO8UJhkO6JdwZPd78xIdHZNhjx+pib+4fC2Cljuhjyl0QwA2F3df/bs4Bp6A==
"@parcel/[email protected]":
version "2.5.1"
@@ -15031,69 +15031,69 @@ own-keys@^1.0.1:
object-keys "^1.1.1"
safe-push-apply "^1.0.0"
- version "0.46.0"
- resolved "https://registry.yarnpkg.com/oxfmt/-/oxfmt-0.46.0.tgz#33789146055129820102203b4397eb4932ada687"
- integrity sha512-CopwJOwPAjZ9p76fCvz+mSOJTw9/NY3cSksZK3VO/bUQ8UoEcketNgUuYS0UB3p+R9XnXe7wGGXUmyFxc7QxJA==
+ version "0.47.0"
+ resolved "https://registry.yarnpkg.com/oxfmt/-/oxfmt-0.47.0.tgz#34faf46a5f7c22138ac9d566ac28be7c52e8ca98"
+ integrity sha512-OFbkbzxKCpooQEnRmpTDnuwTX8KHXzZTQ4Df/hz85fpS67Pl+lxPEFvUtin56HIIS0B1k4X8oIzTXRZPufA2CA==
dependencies:
tinypool "2.1.0"
optionalDependencies:
- "@oxfmt/binding-android-arm-eabi" "0.46.0"
- "@oxfmt/binding-android-arm64" "0.46.0"
- "@oxfmt/binding-darwin-arm64" "0.46.0"
- "@oxfmt/binding-darwin-x64" "0.46.0"
- "@oxfmt/binding-freebsd-x64" "0.46.0"
- "@oxfmt/binding-linux-arm-gnueabihf" "0.46.0"
- "@oxfmt/binding-linux-arm-musleabihf" "0.46.0"
- "@oxfmt/binding-linux-arm64-gnu" "0.46.0"
- "@oxfmt/binding-linux-arm64-musl" "0.46.0"
- "@oxfmt/binding-linux-ppc64-gnu" "0.46.0"
- "@oxfmt/binding-linux-riscv64-gnu" "0.46.0"
- "@oxfmt/binding-linux-riscv64-musl" "0.46.0"
- "@oxfmt/binding-linux-s390x-gnu" "0.46.0"
- "@oxfmt/binding-linux-x64-gnu" "0.46.0"
- "@oxfmt/binding-linux-x64-musl" "0.46.0"
- "@oxfmt/binding-openharmony-arm64" "0.46.0"
- "@oxfmt/binding-win32-arm64-msvc" "0.46.0"
- "@oxfmt/binding-win32-ia32-msvc" "0.46.0"
- "@oxfmt/binding-win32-x64-msvc" "0.46.0"
-
- version "0.21.1"
- resolved "https://registry.yarnpkg.com/oxlint-tsgolint/-/oxlint-tsgolint-0.21.1.tgz#92e87d455283b346087fbff6d0481da9b5276640"
- integrity sha512-O2hxiT14C2HJkwzBU6CQBFPoagSd/IcV+Tt3e3UUaXFwbW4BO5DSDPSSboc3UM5MIDY+MLyepvtQwBQafNxWdw==
+ "@oxfmt/binding-android-arm-eabi" "0.47.0"
+ "@oxfmt/binding-android-arm64" "0.47.0"
+ "@oxfmt/binding-darwin-arm64" "0.47.0"
+ "@oxfmt/binding-darwin-x64" "0.47.0"
+ "@oxfmt/binding-freebsd-x64" "0.47.0"
+ "@oxfmt/binding-linux-arm-gnueabihf" "0.47.0"
+ "@oxfmt/binding-linux-arm-musleabihf" "0.47.0"
+ "@oxfmt/binding-linux-arm64-gnu" "0.47.0"
+ "@oxfmt/binding-linux-arm64-musl" "0.47.0"
+ "@oxfmt/binding-linux-ppc64-gnu" "0.47.0"
+ "@oxfmt/binding-linux-riscv64-gnu" "0.47.0"
+ "@oxfmt/binding-linux-riscv64-musl" "0.47.0"
+ "@oxfmt/binding-linux-s390x-gnu" "0.47.0"
+ "@oxfmt/binding-linux-x64-gnu" "0.47.0"
+ "@oxfmt/binding-linux-x64-musl" "0.47.0"
+ "@oxfmt/binding-openharmony-arm64" "0.47.0"
+ "@oxfmt/binding-win32-arm64-msvc" "0.47.0"
+ "@oxfmt/binding-win32-ia32-msvc" "0.47.0"
+ "@oxfmt/binding-win32-x64-msvc" "0.47.0"
+
+ version "0.22.1"
+ resolved "https://registry.yarnpkg.com/oxlint-tsgolint/-/oxlint-tsgolint-0.22.1.tgz#740bd4855c022611929732e7f996179e21ea153b"
+ integrity sha512-YUSGSLUnoolsu8gxISEDio3q1rtsCozwfOzASUn3DT2mR2EeQ93uEEnen7s+6LpF+lyTQFln1pQfqwBh/fsVEg==
optionalDependencies:
- "@oxlint-tsgolint/darwin-arm64" "0.21.1"
- "@oxlint-tsgolint/darwin-x64" "0.21.1"
- "@oxlint-tsgolint/linux-arm64" "0.21.1"
- "@oxlint-tsgolint/linux-x64" "0.21.1"
- "@oxlint-tsgolint/win32-arm64" "0.21.1"
- "@oxlint-tsgolint/win32-x64" "0.21.1"
-
- version "1.61.0"
- resolved "https://registry.yarnpkg.com/oxlint/-/oxlint-1.61.0.tgz#e714742cfe7b815713feb14600b0ffe963d539a4"
- integrity sha512-ZC0ALuhDZ6ivOFG+sy0D0pEDN49EvsId98zVlmYdkcXHsEM14m/qTNUEsUpiFiCVbpIxYtVBmmLE87nsbUHohQ==
+ "@oxlint-tsgolint/darwin-arm64" "0.22.1"
+ "@oxlint-tsgolint/darwin-x64" "0.22.1"
+ "@oxlint-tsgolint/linux-arm64" "0.22.1"
+ "@oxlint-tsgolint/linux-x64" "0.22.1"
+ "@oxlint-tsgolint/win32-arm64" "0.22.1"
+ "@oxlint-tsgolint/win32-x64" "0.22.1"
+
+ version "1.62.0"
+ resolved "https://registry.yarnpkg.com/oxlint/-/oxlint-1.62.0.tgz#952d1ad5f05688c860b1fa3d168f31913fb51bc3"
+ integrity sha512-1uFkg6HakjsGIpW9wNdeW4/2LOHW9MEkoWjZUTUfQtIHyLIZPYt00w3Sg+H3lH+206FgBPHBbW5dVE5l2ExECQ==
optionalDependencies:
- "@oxlint/binding-android-arm-eabi" "1.61.0"
- "@oxlint/binding-android-arm64" "1.61.0"
- "@oxlint/binding-darwin-arm64" "1.61.0"
- "@oxlint/binding-darwin-x64" "1.61.0"
- "@oxlint/binding-freebsd-x64" "1.61.0"
- "@oxlint/binding-linux-arm-gnueabihf" "1.61.0"
- "@oxlint/binding-linux-arm-musleabihf" "1.61.0"
- "@oxlint/binding-linux-arm64-gnu" "1.61.0"
- "@oxlint/binding-linux-arm64-musl" "1.61.0"
- "@oxlint/binding-linux-ppc64-gnu" "1.61.0"
- "@oxlint/binding-linux-riscv64-gnu" "1.61.0"
- "@oxlint/binding-linux-riscv64-musl" "1.61.0"
- "@oxlint/binding-linux-s390x-gnu" "1.61.0"
- "@oxlint/binding-linux-x64-gnu" "1.61.0"
- "@oxlint/binding-linux-x64-musl" "1.61.0"
- "@oxlint/binding-openharmony-arm64" "1.61.0"
- "@oxlint/binding-win32-arm64-msvc" "1.61.0"
- "@oxlint/binding-win32-ia32-msvc" "1.61.0"
- "@oxlint/binding-win32-x64-msvc" "1.61.0"
+ "@oxlint/binding-android-arm-eabi" "1.62.0"
+ "@oxlint/binding-android-arm64" "1.62.0"
+ "@oxlint/binding-darwin-arm64" "1.62.0"
+ "@oxlint/binding-darwin-x64" "1.62.0"
+ "@oxlint/binding-freebsd-x64" "1.62.0"
+ "@oxlint/binding-linux-arm-gnueabihf" "1.62.0"
+ "@oxlint/binding-linux-arm-musleabihf" "1.62.0"
+ "@oxlint/binding-linux-arm64-gnu" "1.62.0"
+ "@oxlint/binding-linux-arm64-musl" "1.62.0"
+ "@oxlint/binding-linux-ppc64-gnu" "1.62.0"
+ "@oxlint/binding-linux-riscv64-gnu" "1.62.0"
+ "@oxlint/binding-linux-riscv64-musl" "1.62.0"
+ "@oxlint/binding-linux-s390x-gnu" "1.62.0"
+ "@oxlint/binding-linux-x64-gnu" "1.62.0"
+ "@oxlint/binding-linux-x64-musl" "1.62.0"
+ "@oxlint/binding-openharmony-arm64" "1.62.0"
+ "@oxlint/binding-win32-arm64-msvc" "1.62.0"
+ "@oxlint/binding-win32-ia32-msvc" "1.62.0"
+ "@oxlint/binding-win32-x64-msvc" "1.62.0"
p-cancelable@^2.0.0:
version "2.1.1"