Skip to content

Commit cac6dd1

Browse files
authored
test: run unit tests in GitHub workflow & run all tests (#141)
* test: add type workflow * test: fix test assertion for `webp` default * test: run all tests
1 parent 3efd411 commit cac6dd1

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/automated-tests.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions:
99
contents: read
1010

1111
jobs:
12-
code-style-check:
12+
ci:
1313
runs-on: ubuntu-slim
1414
timeout-minutes: 10
1515
steps:
@@ -30,4 +30,6 @@ jobs:
3030
run: node --run test:spelling
3131
- name: Check linting
3232
run: node --run lint
33+
- name: Run Unit Tests
34+
run: npm run test:unit
3335
- run: echo "🍏 This job's status is ${{ job.status }}."

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"lint:fix": "eslint --fix && prettier . --write",
4747
"prepare": "simple-git-hooks",
4848
"test": "node --run test:fixtures && node --run lint && node --run golden:check && node --run schemas:check && node --run test:unit && node --run test:spelling",
49-
"test:unit": "node --test scripts/shared/__tests__/**/*.test.js && node --test scripts/check-modules/__tests__/**/*.test.js && node --test scripts/check-modules/compare/__tests__/**/*.test.js",
49+
"test:unit": "node --test scripts/**/__tests__/**/*.test.js",
5050
"test:spelling": "cspell .",
5151
"leaveMenu": "echo 'Leaving menu...'"
5252
},

scripts/shared/__tests__/deterministic-output.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ describe("deterministic-output", () => {
118118
assert.strictEqual(name, "MMM-Test---example.png");
119119
});
120120

121-
it("should use default jpg extension", () => {
121+
it("should use default webp extension", () => {
122122
const name = createDeterministicImageName("MMM-Test", "example");
123123

124-
assert.strictEqual(name, "MMM-Test---example.jpg");
124+
assert.strictEqual(name, "MMM-Test---example.webp");
125125
});
126126

127127
it("should be human-readable", () => {

0 commit comments

Comments
 (0)