A calm place to write long-form, and publish it to the open social web. skypress.blog/
0

Configure Feed

Select the types of activity you want to include in your feed.

at trunk 730 B View raw
1import { describe, it, expect } from 'vitest'; 2import { createElement } from 'react'; 3import { renderToStaticMarkup } from 'react-dom/server'; 4import ProviderLogo from './ProviderLogo'; 5 6describe( 'ProviderLogo', () => { 7 it( 'renders nothing when the provider is null', () => { 8 expect( renderToStaticMarkup( createElement( ProviderLogo, { provider: null } ) ) ).toBe( '' ); 9 } ); 10 11 it( "renders the provider's labelled svg glyph", () => { 12 const html = renderToStaticMarkup( createElement( ProviderLogo, { provider: 'leaflet' } ) ); 13 expect( html ).toContain( '<svg' ); 14 expect( html ).toContain( 'aria-label="Leaflet"' ); 15 expect( html ).toContain( 'role="img"' ); 16 expect( html ).toContain( 'currentColor' ); 17 } ); 18} );