refactor(tests): update Result tests for consistency and readability #48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| test-bun: | |
| name: Test with Bun | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run lint | |
| run: bun run lint | |
| - name: Run tests and coverage | |
| run: bun run test | |
| build-node: | |
| name: Build compatibility check with Node.js ${{ matrix.node-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x, 22.x] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install TypeScript | |
| run: npm install -g typescript | |
| - name: Type check | |
| run: tsc --noEmit | |
| - name: Check package imports | |
| run: | | |
| node -e "import('./dist/index.js').then(() => console.log('✓ ESM import works')).catch(e => { console.error(e); process.exit(1); })" || echo "Build artifacts not present, skipping runtime check" |