diff --git a/components/__tests__/TruncatedTextWithTooltip.test.js b/components/__tests__/TruncatedTextWithTooltip.test.js new file mode 100644 index 00000000000..9538134253f --- /dev/null +++ b/components/__tests__/TruncatedTextWithTooltip.test.js @@ -0,0 +1,27 @@ +import 'jest-styled-components'; + +import React from 'react'; +import { ThemeProvider } from 'styled-components'; + +import theme from '../../lib/theme'; +import { snapshot } from '../../test/snapshot-helpers'; + +import TruncatedTextWithTooltip from '../TruncatedTextWithTooltip'; + +describe('TruncatedTextWithTooltip component', () => { + it('renders default options', () => { + snapshot( + + + , + ); + }); + + it('renders default options', () => { + snapshot( + + + , + ); + }); +}); diff --git a/components/__tests__/__snapshots__/TruncatedTextWithTooltip.test.js.snap b/components/__tests__/__snapshots__/TruncatedTextWithTooltip.test.js.snap new file mode 100644 index 00000000000..aff644b1ab0 --- /dev/null +++ b/components/__tests__/__snapshots__/TruncatedTextWithTooltip.test.js.snap @@ -0,0 +1,23 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`TruncatedTextWithTooltip component renders default options 1`] = `"A short string"`; + +exports[`TruncatedTextWithTooltip component renders default options 2`] = ` +.c0 { + display: inline-block; + cursor: help; +} + +.c0 button:disabled { + pointer-events: none; +} + +
+ a string that is more than ... +
+`;