Generate scaffolding with preact-cli default

This commit is contained in:
Abhas Bhattacharya
2019-02-28 13:12:45 +05:30
commit 899ed90ff1
24 changed files with 347 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
import Header from '../src/components/header';
import { Link } from 'preact-router/match';
// See: https://github.com/mzgoddard/preact-render-spy
import { shallow } from 'preact-render-spy';
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);
});
});