1
1
mirror of https://github.com/jxnblk/mdx-deck.git synced 2024-11-05 06:06:17 +03:00

Adjust tests

This commit is contained in:
Brent Jackson 2020-02-01 12:04:42 -05:00
parent 903985fff5
commit 65aaf342c5
3 changed files with 43 additions and 4 deletions

View File

@ -11,11 +11,12 @@ context('MDX Deck', () => {
cy.contains('MDX Deck')
})
/* doesn't work
/* doesn't work?? */
it('goes to the next slide', () => {
cy.get('body')
.type('{rightarrow}')
.trigger('keydown', {
keyCode: 39,
})
.contains('Presentation')
})
*/
})

View File

@ -6,7 +6,8 @@
"license": "MIT",
"repository": "github:jxnblk/mdx-deck",
"scripts": {
"start": "gatsby develop --open"
"start": "gatsby develop --open",
"test": "jest"
},
"peerDependencies": {
"gatsby": "^2.14.0",
@ -28,5 +29,30 @@
"devDependencies": {
"cypress": "^3.4.0",
"lerna": "^3.13.1"
},
"jest": {
"testMatch": [
"**/test/*.js"
],
"testPathIgnorePatterns": [
"/node_modules/",
"/fixtures/"
],
"coverageReporters": [
"lcov",
"text",
"html"
],
"collectCoverageFrom": [
"**/src/**/*.js"
],
"coverageThreshold": {
"global": {
"branches": 80,
"functions": 80,
"lines": 80,
"statements": 80
}
}
}
}

View File

@ -0,0 +1,12 @@
import React from 'react'
import {
render,
fireEvent,
cleanup
} from '@testing-library/react'
import Deck from '../src/deck'
afterEach(cleanup)
test('renders', () => {
})