Skip to content

Commit 0a123e6

Browse files
committed
fix ut
1 parent 05e3dd2 commit 0a123e6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎test/common/mapping/WebMapV3Spec.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2046,10 +2046,10 @@ describe('WebMapV3 - _createLayerLegendList', () => {
20462046
const result = instance._createLayerLegendList(layer, styleSetting);
20472047
const colorLegend = result.find((item) => item.styleField === 'color');
20482048

2049-
expect(result).toHaveLength(2);
2049+
expect(result.length).toBe(2);
20502050
expect(result.some((item) => !item.styleField)).toBe(true);
20512051
expect(colorLegend).toBeDefined();
2052-
expect(colorLegend.styleGroup).toHaveLength(1);
2052+
expect(colorLegend.styleGroup.length).toBe(1);
20532053
expect(colorLegend.styleGroup[0].style.colors).toEqual([
20542054
{ key: 'sourceColor', value: '#4A90E2' },
20552055
{ key: 'targetColor', value: '#7ED321' }
@@ -2119,7 +2119,7 @@ describe('WebMapV3 - _createLayerLegendList', () => {
21192119
const symbolLegend = result.find((item) => item.styleField === 'symbolsContent');
21202120
expect(symbolLegend).toBeDefined();
21212121
expect(symbolLegend.themeField).toBe('TYPE');
2122-
expect(symbolLegend.styleGroup).toHaveLength(3);
2122+
expect(symbolLegend.styleGroup.length).toBe(3);
21232123
expect(symbolLegend.styleGroup.map((item) => item.fieldValue)).toEqual(['A', 'B', null]);
21242124
});
21252125

0 commit comments

Comments
 (0)