Skip to content

Commit cdbe723

Browse files
committed
Setup baseline tests
0 parents  commit cdbe723

File tree

8 files changed

+152
-0
lines changed

8 files changed

+152
-0
lines changed

.github/workflows/tests.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: tests
2+
3+
on: [pull_request, push, merge_group]
4+
5+
env:
6+
FORCE_COLOR: 1
7+
8+
jobs:
9+
test:
10+
runs-on: ${{ matrix.os }}
11+
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest]
16+
node: ['24']
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Use Node.js ${{ matrix.node }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node }}
24+
- run: npm i
25+
- name: Simulate work (1 min wait)
26+
run: sleep 60
27+
- run: npm test --color=always

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
node_modules
2+
sandbox.js
3+
.nyc_output
4+
public
5+
coverage
6+
.tap
7+
8+
# Generated types
9+
10+
*.d.ts
11+
*.d.ts.map
12+
13+
# Generated js
14+
15+
*.js
16+
!*.config.js

index.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import test from 'node:test'
2+
import assert from 'node:assert'
3+
import { hello } from './index.ts'
4+
5+
test('index export', async (_t) => {
6+
assert.strictEqual(hello(), 'world', 'A message')
7+
})

index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { foo } from './lib/library.ts'
2+
3+
export function hello () {
4+
console.log(foo)
5+
return 'world'
6+
}

lib/library.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const foo = 'bar'

package-lock.json

Lines changed: 58 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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "merge_group_test",
3+
"description": "WIP - nothing to see here",
4+
"version": "0.0.0",
5+
"dependencies": {},
6+
"devDependencies": {
7+
"@voxpelli/tsconfig": "^15.1.2",
8+
"@types/node": "^24.0.3",
9+
"typescript": "~5.8.2"
10+
},
11+
"type": "module",
12+
"module": "index.js",
13+
"main": "index.js",
14+
"types": "index.d.ts",
15+
"scripts": {
16+
"test": "node --experimental-strip-types --test --test-reporter spec && tsc"
17+
}
18+
}

tsconfig.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"extends": "@voxpelli/tsconfig/node20.json",
3+
"compilerOptions": {
4+
"skipLibCheck": true,
5+
"erasableSyntaxOnly": true,
6+
"allowImportingTsExtensions": true,
7+
"rewriteRelativeImportExtensions": true,
8+
"verbatimModuleSyntax": true
9+
},
10+
"include": [
11+
"**/*"
12+
],
13+
"exclude": [
14+
"**/*.js",
15+
"node_modules",
16+
"coverage",
17+
".github"
18+
]
19+
}

0 commit comments

Comments
 (0)