add tests (#1)

This commit is contained in:
Rich Harris
2017-12-17 19:35:01 -05:00
parent 4ff205d065
commit f4b72b4754
10 changed files with 124 additions and 2 deletions

View File

@@ -0,0 +1,19 @@
describe('Sapper template app', () => {
beforeEach(() => {
cy.visit('/')
});
it('has the correct <h1>', () => {
cy.contains('h1', 'Great success!')
});
it('navigates to /about', () => {
cy.get('nav a').contains('about').click();
cy.url().should('include', '/about');
});
it('navigates to /blog', () => {
cy.get('nav a').contains('blog').click();
cy.url().should('include', '/blog');
});
});