Skip to content

Commit 35adbfa

Browse files
committed
fix jest tests
1 parent 030e176 commit 35adbfa

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

x-pack/legacy/plugins/maps/public/layers/styles/vector/components/legend/__snapshots__/vector_icon.test.js.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/legacy/plugins/maps/public/layers/styles/vector/components/symbol/__snapshots__/icon_select.test.js.snap

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/legacy/plugins/maps/public/layers/styles/vector/symbol_utils.test.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,12 @@ describe('styleSvg', () => {
3232
);
3333
});
3434

35-
it('Should add stroke style property to svg element', async () => {
35+
it('Should add stroke and stroke-wdth style properties to svg element', async () => {
3636
const unstyledSvgString =
3737
'<svg version="1.1" width="11px" height="11px" viewBox="0 0 11 11"><path/></svg>';
3838
const styledSvg = await styleSvg(unstyledSvgString, 'red', 'white');
3939
expect(styledSvg.split('\n')[1]).toBe(
40-
'<svg version="1.1" width="11px" height="11px" viewBox="0 0 11 11" style="fill:red;stroke:white;">'
41-
);
42-
});
43-
44-
it('Should add stroke-width style property to svg element', async () => {
45-
const unstyledSvgString =
46-
'<svg version="1.1" width="11px" height="11px" viewBox="0 0 11 11"><path/></svg>';
47-
const styledSvg = await styleSvg(unstyledSvgString, 'red', 'white', '2px');
48-
expect(styledSvg.split('\n')[1]).toBe(
49-
'<svg version="1.1" width="11px" height="11px" viewBox="0 0 11 11" style="fill:red;stroke:white;stroke-width:2px;">'
40+
'<svg version=\"1.1\" width=\"11px\" height=\"11px\" viewBox=\"0 0 11 11\" style=\"fill:red;stroke:white;stroke-width:1;\">'
5041
);
5142
});
5243
});

0 commit comments

Comments
 (0)