Skip to content

Commit

Permalink
Add Cypress TDD suite
Browse files Browse the repository at this point in the history
  • Loading branch information
mtaylor769 committed Jun 27, 2020
1 parent f9f4891 commit 1fab479
Show file tree
Hide file tree
Showing 8 changed files with 956 additions and 26 deletions.
4 changes: 2 additions & 2 deletions cypress/integration/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ describe('Sapper template app', () => {
});

it('has the correct <h1>', () => {
cy.contains('h1', 'Great success!')
cy.contains('h1', 'Tyler Tech Booth')
});

it('navigates to /about', () => {
Expand All @@ -16,4 +16,4 @@ describe('Sapper template app', () => {
cy.get('nav a').contains('blog').click();
cy.url().should('include', '/blog');
});
});
});
7 changes: 7 additions & 0 deletions cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@ import './commands'

// Alternatively you can use CommonJS syntax:
// require('./commands')

// To turn off all uncaught exception handling
Cypress.on('uncaught:exception', (err, runnable) => {
// returning false here prevents Cypress from
// failing the test
return false
})
13 changes: 13 additions & 0 deletions cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"allowJs": true,
"baseUrl": "../node_modules",
"types": [
"cypress"
],
"noEmit": true
},
"include": [
"**/*.*"
]
}
Loading

0 comments on commit 1fab479

Please sign in to comment.