Skip to content

Commit

Permalink
More descriptive test names
Browse files Browse the repository at this point in the history
  • Loading branch information
tsck committed Nov 1, 2024
1 parent d78a0d5 commit 90888aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions charts/core/src/Chart/hooks/updateUtils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ChartOptions } from '../Chart.types';
import { addSeries, removeSeries, updateOptions } from './updateUtils';

describe('@lg-charts/core/Chart/hooks/updateUtils', () => {
test('should add a series to the chart options', () => {
test('addSeries should add a series to the chart options', () => {
const currentOptions: Partial<ChartOptions> = {
series: [{ name: 'series1' }],
};
Expand All @@ -14,7 +14,7 @@ describe('@lg-charts/core/Chart/hooks/updateUtils', () => {
expect(updatedOptions.series?.[1].name).toBe(newSeriesName);
});

test('should not add a series if a chart with the same name exists', () => {
test('addSeries should not add a series if a chart with the same name exists', () => {
const currentOptions: Partial<ChartOptions> = {
series: [{ name: 'series1' }],
};
Expand All @@ -25,7 +25,7 @@ describe('@lg-charts/core/Chart/hooks/updateUtils', () => {
expect(updatedOptions.series?.[0].name).toBe(newSeriesName);
});

test('should remove a series from the chart options', () => {
test('removeSeries should remove a series from the chart options', () => {
const currentOptions: Partial<ChartOptions> = {
series: [{ name: 'series1' }, { name: 'series2' }],
};
Expand All @@ -39,7 +39,7 @@ describe('@lg-charts/core/Chart/hooks/updateUtils', () => {
/**
* Tests that option updates don't overwrite the entire chart options object.
*/
test('should merge chart options non-destructively', () => {
test('updateOptions should merge chart options non-destructively', () => {
const currentOptions: Partial<ChartOptions> = {
xAxis: {
show: true,
Expand Down

0 comments on commit 90888aa

Please sign in to comment.