Skip to content

Commit

Permalink
Fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexagon committed Mar 11, 2024
1 parent ddc637b commit b6ef2ac
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 10 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
Expand All @@ -16,10 +13,10 @@ jobs:

strategy:
matrix:
node-version: [18.x, 20.x, 21.x]
node-version: [18.x, 21.x]

steps:
- uses: actions/checkout@v3
- run: npx jsr add @cross/test @std/assert
- run: echo '{ "type": "module" }' > package.json
- run: npx tsx --test
- uses: actions/checkout@v3
- run: npx jsr add @cross/test @std/assert
- run: "echo '{ \"type\": \"module\" }' > package.json" # Needed for tsx to work
- run: npx tsx --test
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ test("Async test", (_context, done) => {

- **Directly in your runtime:**
- **Node.js:** `node --test`
- **Node.js (TS):** `npx tsx --test` <- Make sure to use `{ "type": "module" }` to be able to use tsx with `@cross/test`
- **Node.js (TS):** `npx tsx --test` _Make sure to use `{ "type": "module" }` to be able to use tsx with `@cross/test`_
- **Deno:** `deno test`
- **Bun:** `bun test`

Expand Down Expand Up @@ -89,3 +89,30 @@ jobs:
- run: deno add @cross/test @std/assert # Installs dependencies from jsr.io
- run: deno test # Runs tests
```
- **Node (GitHub actions):**
```yaml
name: Node.js CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 21.x]

steps:
- uses: actions/checkout@v3
- run: npx jsr add @cross/test @std/assert
- run: "echo '{ \"type\": \"module\" }' > package.json" # Needed for tsx to work
- run: npx tsx --test
```
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cross/test",
"version": "0.0.6",
"version": "0.0.7",
"exports": "./mod.ts",
"fmt": {
"lineWidth": 200
Expand Down

0 comments on commit b6ef2ac

Please sign in to comment.