Skip to content

Commit c748467

Browse files
committed
add test:all and fix 01/01 solution test
1 parent bf7f41c commit c748467

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

exercises/01.setup/01.solution.vscode-extension/src/sort-by.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ test('sorts a list of players by their score', () => {
2020
'score',
2121
),
2222
).toEqual([
23-
{ name: 'Sarah', score: 21 },
24-
{ name: 'John', score: 10 },
2523
{ name: 'Allen', score: 5 },
24+
{ name: 'John', score: 10 },
25+
{ name: 'Sarah', score: 21 },
2626
])
2727
})

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,13 @@
3030
"start": "npx --prefix ./epicshop epicshop start",
3131
"dev": "npx --prefix ./epicshop epicshop start",
3232
"test": "npm run test --silent --prefix playground",
33-
"test:e2e": "npm run test:e2e --silent --prefix playground",
34-
"test:e2e:dev": "npm run test:e2e:dev --silent --prefix playground",
35-
"test:e2e:run": "npm run test:e2e:run --silent --prefix playground",
3633
"setup": "node ./epicshop/setup.js",
3734
"setup:custom": "node ./epicshop/setup-custom.js",
3835
"lint": "eslint .",
3936
"format": "prettier --write .",
40-
"typecheck": "tsc -b"
37+
"typecheck": "tsc -b",
38+
"test:all": "find exercises -type f -name package.json -print0 | xargs -0 -n1 dirname | grep -E '/[^/]*\\.solution\\.[^/]*$' | xargs -I{} npm -w {} run test --if-present",
39+
"validate": "npm run typecheck && npm run lint && npm run test:all"
4140
},
4241
"keywords": [],
4342
"author": "Artem Zakharchenko <[email protected]> (https://kettanaito.com/)",

0 commit comments

Comments
 (0)