Skip to content
This repository was archived by the owner on Mar 5, 2022. It is now read-only.

Commit e01898a

Browse files
authored
stop exclusive tests (#315)
1 parent d7c34f6 commit e01898a

File tree

7 files changed

+53
-4
lines changed

7 files changed

+53
-4
lines changed

circle.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ workflows:
2626
- run:
2727
name: Linting code 🧹
2828
command: npm run lint
29+
- run:
30+
name: Stop exclusive tests 1️⃣
31+
command: npm run stop-only
2932
- run:
3033
name: Check markdown links ⚓️
3134
command: npm run check:links

cypress/component/advanced/react-book-example/src/Note.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React from 'react'
44
import Select from './Note'
55

66
describe('Note', () => {
7-
it.only('save text', () => {
7+
it('save text', () => {
88
mount(<Select />)
99
cy.get('#change').type('input text')
1010
cy.contains('button', 'Save').click()

cypress/component/advanced/tutorial/square-spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Square extends React.Component {
2424
}
2525

2626
describe('Square', () => {
27-
it.only('changes value on click', () => {
27+
it('changes value on click', () => {
2828
const selector = 'button.square'
2929
mount(<Square value="X" />)
3030
// initially button is blank

cypress/component/advanced/use-local-storage/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# localStorage with useEffect
22

3+
<!-- markdown-link-check-disable -->
4+
35
App idea from https://twitter.com/housecor/status/1268900696604258304
46

7+
<!-- markdown-link-check-enable -->
8+
59
Shows how to set `localStorage` before mounting the component, and how to clear the local storage before each test.
610

711
![Test](images/cart.png)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
<!-- markdown-link-check-disable -->
2+
13
These tests follow examples from the free [React Book](https://softchris.github.io/books/react) by [Christoffer Noring](https://twitter.com/chris_noring).
4+
5+
<!-- markdown-link-check-enable -->

package-lock.json

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@
1616
"lint": "standard --verbose --fix *.js src cypress/integration",
1717
"semantic-release": "semantic-release",
1818
"format": "prettier --write '*.js', 'src/*.jsx' 'cypress/**/*.js' 'cypress/**/*.jsx' 'lib/*.ts'",
19-
"check:links": "find . -type f -name 'README.md' ! -path './node_modules/*' | xargs -L1 npx markdown-link-check --quiet"
19+
"check:links": "find . -type f -name 'README.md' ! -path './node_modules/*' | xargs -L1 npx markdown-link-check --quiet",
20+
"stop-only": "stop-only --folder cypress",
21+
"warn-only": "stop-only --warn --folder cypress"
2022
},
2123
"husky": {
2224
"hooks": {
23-
"pre-commit": "lint-staged"
25+
"pre-commit": "lint-staged && npm run warn-only",
26+
"pre-push": "npm run stop-only"
2427
}
2528
},
2629
"lint-staged": {
@@ -100,6 +103,7 @@
100103
"react-tooltip": "4.2.6",
101104
"semantic-release": "17.1.0",
102105
"standard": "14.3.3",
106+
"stop-only": "3.1.0",
103107
"style-loader": "0.23.1",
104108
"styled-components": "5.0.0",
105109
"svg-url-loader": "3.0.3",

0 commit comments

Comments
 (0)