diff --git a/test/RLayerMisc.test.tsx b/test/RLayerMisc.test.tsx index 8503d1cb..01602fd3 100644 --- a/test/RLayerMisc.test.tsx +++ b/test/RLayerMisc.test.tsx @@ -15,21 +15,24 @@ import RLayerStadia from 'rlayers/layer/RLayerStadia'; import * as common from './common'; describe('', () => { - it('should display a tiled Stadia layer', () => { - const layer = React.createRef() as React.RefObject; - const {container} = render( - - - - ); - expect((layer.current?.source.getUrls() || [])[0]).toBe( - `https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key=${process.env.STADIA_MAPS_API_KEY}` - ); - }); + (process.env.STADIA_MAPS_API_KEY ? it : it.skip)( + 'should display a tiled Stadia layer', + function () { + const layer = React.createRef() as React.RefObject; + const {container} = render( + + + + ); + expect((layer.current?.source.getUrls() || [])[0]).toBe( + `https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key=${process.env.STADIA_MAPS_API_KEY}` + ); + } + ); }); describe('', () => {