Commit e5728d69 authored by Robert Knight's avatar Robert Knight

Add a note about why the SvgIcon tests do not use Enzyme

parent 6842a489
...@@ -5,6 +5,10 @@ const { createElement, render } = require('preact'); ...@@ -5,6 +5,10 @@ const { createElement, render } = require('preact');
const SvgIcon = require('../svg-icon'); const SvgIcon = require('../svg-icon');
describe('SvgIcon', () => { describe('SvgIcon', () => {
// Tests here use DOM APIs rather than Enzyme because SvgIcon uses
// `dangerouslySetInnerHTML` for its content, and that is not visible in the
// Enzyme tree.
it("sets the element's content to the content of the SVG", () => { it("sets the element's content to the content of the SVG", () => {
const container = document.createElement('div'); const container = document.createElement('div');
render(<SvgIcon name="refresh" />, container); render(<SvgIcon name="refresh" />, container);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment