mirror of
https://github.com/chinchang/web-maker.git
synced 2025-08-03 11:57:34 +02:00
Merge pull request #306 from DanielRuf/chore/improve-ci
chore: improve Travis CI config
This commit is contained in:
12
src/tests/footer.test.js
Normal file
12
src/tests/footer.test.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { h, Component } from 'preact';
|
||||
import Footer from '../components/Footer';
|
||||
import { Link } from 'preact-router/match';
|
||||
// See: https://github.com/mzgoddard/preact-render-spy
|
||||
import { shallow, deep } from 'preact-render-spy';
|
||||
|
||||
describe('Initial Test of the Footer', () => {
|
||||
test('Footer renders 1 link with an ID of notificationsBtn', () => {
|
||||
const context = shallow(<Footer />);
|
||||
expect(context.find('#notificationsBtn').exists()).toBeTruthy();
|
||||
});
|
||||
});
|
@@ -1,14 +0,0 @@
|
||||
import { h, Component } from 'preact';
|
||||
import Header from '../components/header';
|
||||
import { Link } from 'preact-router/match';
|
||||
// See: https://github.com/mzgoddard/preact-render-spy
|
||||
import { shallow, deep } 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);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user