summaryrefslogtreecommitdiff
path: root/@linaria/examples/Preact/preact-example/tests/header.test.js
diff options
context:
space:
mode:
Diffstat (limited to '@linaria/examples/Preact/preact-example/tests/header.test.js')
-rw-r--r--@linaria/examples/Preact/preact-example/tests/header.test.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/@linaria/examples/Preact/preact-example/tests/header.test.js b/@linaria/examples/Preact/preact-example/tests/header.test.js
new file mode 100644
index 0000000..f116ef4
--- /dev/null
+++ b/@linaria/examples/Preact/preact-example/tests/header.test.js
@@ -0,0 +1,12 @@
+import { h } from 'preact';
+import Header from '../src/components/header';
+// See: https://github.com/preactjs/enzyme-adapter-preact-pure
+import { shallow } from 'enzyme';
+
+describe('Initial Test of the Header', () => {
+ test('Header renders 3 nav items', () => {
+ const context = shallow(<Header />);
+ expect(context.find('h1').text()).toBe('Preact App');
+ expect(context.find('Link').length).toBe(3);
+ });
+});