Skip to content

Commit ac10bce

Browse files
authored
fix: skipped tests (#38)
* feat: add build:test and test:build scripts to enhance testing workflow in package.json; update GitHub Actions to streamline build and test process * refactor: convert sanity test to ts * chore: update biome.json to include test files
1 parent d5afe64 commit ac10bce

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ jobs:
3535
- name: Lint
3636
run: npm run lint
3737

38-
- name: Build
39-
run: npm run build:ci
40-
env:
41-
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
42-
CLIENT_ID: ${{ secrets.CLIENT_ID }}
43-
44-
- name: Run tests
45-
run: npm run test:ci
38+
- name: Build and test
39+
run: npm run test:build
4640

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
}
3434
},
3535
"files": {
36-
"includes": ["*.ts", "*.js", "*.json", "src/**/*"]
36+
"includes": ["*.ts", "*.js", "*.json", "src/**/*", "test/**/*"]
3737
}
3838
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"build:ci": "npm run build:ts && npm run build:copy",
88
"build:dev": "pnpm run build:ts && pnpm run build:copy",
99
"build:ts": "tsup",
10+
"build:test": "tsup --entry 'src/**/*.ts' --entry 'test/**/*.ts'",
1011
"build:copy": "node scripts/copy-assets.js",
1112
"start": "node dist/index.js",
1213
"dev": "tsx watch src/index.ts",
@@ -22,7 +23,8 @@
2223
"check:fix": "biome check --write .",
2324
"typecheck": "tsc --noEmit",
2425
"test": "pnpm run build:dev && node --test dist/**/*.test.js",
25-
"test:ci": "node --test dist/**/*.test.js",
26+
"test:ci": "node --test $(find dist -name '*.test.js')",
27+
"test:build": "npm run build:test && npm run test:ci",
2628
"prepare": "husky",
2729
"pre-commit": "lint-staged",
2830
"sync-guides": "tsx scripts/sync-guides.js",
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ import test from 'node:test';
44
test('sanity: 1 + 1 equals 2', () => {
55
assert.equal(1 + 1, 2);
66
});
7-

0 commit comments

Comments
 (0)