Skip to content

Commit f2201cd

Browse files
authored
test(wait-on): add automatic test to pre-push (#283)
* feat(husky): add open server * test * testing * test * more test * chore(fix): some things * chore(fix): some things * chore(traverseapproutesplugin): remove console log * refactor(husky): change precommit runner to prepush * fix(package.json): add prod mode * fix(snapshot): update snapshot to prod mode
1 parent df7c59b commit f2201cd

File tree

7 files changed

+270
-225
lines changed

7 files changed

+270
-225
lines changed

.huskyrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"hooks": {
3-
"pre-commit": "npm run test && npm run e2e && pretty-quick --staged"
3+
"pre-commit": "pretty-quick --staged",
4+
"pre-push": "npm run scully:precommit && start-server-and-test scully:r http://localhost:1668 e2e"
45
}
56
}

package-lock.json

Lines changed: 242 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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"test:watch": "jest --watch",
88
"e2e": "cypress run --spec 'cypress/integration/**/*' --browser chrome",
99
"tsc": "tsc",
10+
"scully:run": "npm run scully:dev:all -- serve",
11+
"scully:run:test": "npm run test && npm run e2e",
12+
"scully:r": "node ./dist/scully/scully serve",
13+
"scully:precommit": "npm run scully:compile:all && rm -rf ./dist/static && node ./dist/scully/scully && npm run test",
14+
"scully:compile:all": "ng build @scullyio/ng-lib && ng build --prod && npm run scully:dev:compile",
1015
"generate": "tsc -p ./scully/tsconfig.scully.json && node ./scully/bin",
1116
"scully:dev:watch": "tsc -w -p ./scully/tsconfig.scully.json",
1217
"scully:dev:compile": "tsc -p ./scully/tsconfig.scully.json",
@@ -88,10 +93,12 @@
8893
"pretty-quick": "^2.0.1",
8994
"protractor": "~5.4.2",
9095
"puppeteer": "^2.0.0",
96+
"start-server-and-test": "^1.10.8",
9197
"ts-node": "^8.3.0",
9298
"tsickle": "^0.37.1",
9399
"tslint": "~5.20.1",
94100
"typescript": "^3.6.4",
101+
"wait-on": "^4.0.0",
95102
"yamljs": "^0.3.0",
96103
"yargs": "^14.2.0"
97104
},

0 commit comments

Comments
 (0)