Skip to content

Commit

Permalink
Tweak template test scripts (#290)
Browse files Browse the repository at this point in the history
I've been umming and ahhing on the right approach here, as I like a
fairly unopinionated `test` script into which the user can pass their
desired flags.

Practically speaking, we have some other tooling like our package
publishing pipeline which presumes that the `test` script is suitable
for exhaustive CI testing. `test:watch` should be a reasonable
compromise for local testing, and already has some SEEK precedence with
~46 `package.json` results returned from a GitHub search.
  • Loading branch information
72636c authored Dec 8, 2020
1 parent 04aa18a commit a6984b1
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/cuddly-pillows-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'skuba': patch
---

**template:** Check coverage on default `test` script
5 changes: 5 additions & 0 deletions .changeset/giant-foxes-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'skuba': patch
---

**template:** Include `test:watch` script
3 changes: 2 additions & 1 deletion template/express-rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"lint": "skuba lint",
"start": "ENVIRONMENT=local skuba start",
"start:debug": "ENVIRONMENT=local skuba start --inspect-brk",
"test": "skuba test"
"test": "skuba test --coverage",
"test:watch": "skuba test --watch"
}
}
3 changes: 2 additions & 1 deletion template/greeter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"lint": "skuba lint",
"start": "ENVIRONMENT=local skuba start",
"start:debug": "ENVIRONMENT=local skuba start --inspect-brk",
"test": "skuba test"
"test": "skuba test --coverage",
"test:watch": "skuba test --watch"
}
}
3 changes: 2 additions & 1 deletion template/koa-rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"lint": "skuba lint",
"start": "ENVIRONMENT=local skuba start",
"start:debug": "ENVIRONMENT=local skuba start --inspect-brk",
"test": "skuba test"
"test": "skuba test --coverage",
"test:watch": "skuba test --watch"
}
}
3 changes: 2 additions & 1 deletion template/lambda-sqs-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"deploy": "yarn build && serverless deploy --force --verbose",
"format": "skuba format",
"lint": "skuba lint",
"test": "skuba test"
"test": "skuba test --coverage",
"test:watch": "skuba test --watch"
}
}
3 changes: 2 additions & 1 deletion template/oss-npm-package/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"format": "skuba format",
"lint": "skuba lint",
"release": "yarn build && skuba release",
"test": "skuba test"
"test": "skuba test --coverage",
"test:watch": "skuba test --watch"
},
"sideEffects": false,
"types": "./lib-types/index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion template/private-npm-package/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"format": "skuba format",
"lint": "skuba lint",
"release": "yarn build && skuba release",
"test": "skuba test"
"test": "skuba test --coverage",
"test:watch": "skuba test --watch"
},
"sideEffects": false,
"types": "./lib-types/index.d.ts",
Expand Down

0 comments on commit a6984b1

Please sign in to comment.