@@ -2,7 +2,7 @@ import {mount} from '@cypress/react';
2
2
import React , { createElement as h } from 'react' ;
3
3
import { renderToStaticMarkup } from 'react-dom/server.js' ;
4
4
5
- import { load , useIcon } from '../../../../index.js' ;
5
+ import { loadSystem , useIcon } from '../../../../index.js' ;
6
6
import { parseSvgElement } from '../../../../lib/util/parse-svg-element.js' ;
7
7
import system from '../../../fixtures/test-system.js' ;
8
8
@@ -18,15 +18,15 @@ describe('useIcon', () => {
18
18
} ) ;
19
19
20
20
it ( 'should return null if icon is not found in the system' , ( ) => {
21
- load ( { h, system} ) ;
21
+ loadSystem ( { h, system} ) ;
22
22
mount ( < CustomElement icon = "invalid icon" /> ) ;
23
23
24
24
cy . get ( '@iconSvg' ) . should ( 'equal' , null ) ;
25
25
} ) ;
26
26
27
27
it ( 'should return an SVG element for the specified icon from the system' , ( ) => {
28
28
const icon = 'x' ;
29
- load ( { h, system} ) ;
29
+ loadSystem ( { h, system} ) ;
30
30
mount ( < CustomElement icon = { icon } /> ) ;
31
31
32
32
const svg = system . icons [ icon ] ;
@@ -39,7 +39,7 @@ describe('useIcon', () => {
39
39
} ) ;
40
40
41
41
it ( 'should return an SVG element for the specified nested icon from the system' , ( ) => {
42
- load ( { h, system} ) ;
42
+ loadSystem ( { h, system} ) ;
43
43
mount ( < CustomElement icon = "nested.x" /> ) ;
44
44
const svg = system . icons . nested . x ;
45
45
const svgElement = parseSvgElement ( { h, svg} ) ;
@@ -51,7 +51,7 @@ describe('useIcon', () => {
51
51
} ) ;
52
52
53
53
it ( 'should return an SVG element for the specified direct icon from the system' , ( ) => {
54
- load ( { h, system} ) ;
54
+ loadSystem ( { h, system} ) ;
55
55
mount ( < CustomElement icon = "a.b.c" /> ) ;
56
56
const svg = system . icons [ 'a.b.c' ] ;
57
57
const svgElement = parseSvgElement ( { h, svg} ) ;
0 commit comments