Skip to content

Commit c066387

Browse files
committed
run ts-example server
1 parent a665691 commit c066387

File tree

5 files changed

+31
-4
lines changed

5 files changed

+31
-4
lines changed

.circleci/config.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,27 @@ workflows:
146146
command: npx nyc report --check-coverage true --lines 100
147147
working_directory: examples/before-all-visit
148148

149+
- cypress/run:
150+
attach-workspace: true
151+
name: example-ts-example
152+
requires:
153+
- cypress/install
154+
# there are no jobs to follow this one
155+
# so no need to save the workspace files (saves time)
156+
no-workspace: true
157+
working_directory: examples/ts-example
158+
start: npm start
159+
wait-on: 'http://localhost:1234'
160+
post-steps:
161+
# store the created coverage report folder
162+
# you can click on it in the CircleCI UI
163+
# to see live static HTML site
164+
- store_artifacts:
165+
path: examples/ts-example/coverage
166+
- run:
167+
command: npm run coverage:check
168+
working_directory: examples/ts-example
169+
149170
- publish:
150171
filters:
151172
branches:
@@ -158,3 +179,4 @@ workflows:
158179
- backend coverage
159180
- example-before-each-visit
160181
- example-before-all-visit
182+
- example-ts-example

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ dist/
99
cypress-coverage/
1010
examples/*/cypress/videos
1111
examples/*/cypress/screenshots
12+
yarn.lock

examples/ts-example/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"name": "example-before-each-visit",
33
"description": "Getting code coverage when cy.visit is used in beforeEach hook",
4-
"devDependencies": {},
4+
"devDependencies": {
5+
"@babel/core": "7.9.0"
6+
},
57
"nyc": {
68
"extends": "@istanbuljs/nyc-config-typescript",
79
"all": true
@@ -12,6 +14,7 @@
1214
"serve": "../../node_modules/.bin/serve dist",
1315
"cy:open": "../../node_modules/.bin/cypress open",
1416
"coverage": "../../node_modules/.bin/nyc report --report-dir ./coverage --temp-dir .nyc_output --reporter=lcov",
17+
"coverage:check": "../../node_modules/.bin/nyc report --check-coverage true --lines 100",
1518
"dev": "../../node_modules/.bin/start-test 1234 cy:open",
1619
"dev:dist": "CYPRESS_baseUrl=http://localhost:5000 ../../node_modules/.bin/start-test serve 5000 cy:open"
1720
}

package-lock.json

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

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"prettier": "1.19.1",
6969
"semantic-release": "17.0.4",
7070
"serve": "11.3.0",
71+
"source-map-support": "0.5.16",
7172
"start-server-and-test": "1.10.11",
7273
"typescript": "3.8.3"
7374
}

0 commit comments

Comments
 (0)