forked from binaryjs/js-binarypack
-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switching to `bun test`. `jsdom` is annoying. BREAKING CHANGE: Blobs require making the `pack` interface async
- Loading branch information
1 parent
9a2efa9
commit 12f0e75
Showing
23 changed files
with
1,614 additions
and
16,076 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
|
||
name: Bun CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: oven-sh/setup-bun@v1 | ||
- run: bun install --frozen-lockfile | ||
- run: bun run build | ||
- run: bun test | ||
- run: bun run check |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
# # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
|
||
name: Node.js CI | ||
# name: Node.js CI | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
pull_request: | ||
branches: ["master"] | ||
# on: | ||
# push: | ||
# branches: ["master"] | ||
# pull_request: | ||
# branches: ["master"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
# jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x, 18.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
# strategy: | ||
# matrix: | ||
# node-version: [16.x, 18.x, 20.x] | ||
# # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
- run: npm ci | ||
- run: npm run build | ||
- run: npm run coverage | ||
- name: Publish code coverage to CodeClimate | ||
uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: Use Node.js ${{ matrix.node-version }} | ||
# uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: ${{ matrix.node-version }} | ||
# cache: "npm" | ||
# - run: npm ci | ||
# - run: npm run build | ||
# - run: npm run coverage | ||
# - name: Publish code coverage to CodeClimate | ||
# uses: paambaati/[email protected] | ||
# env: | ||
# CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,16 @@ | ||
# From https://til.simonwillison.net/github-actions/prettier-github-actions | ||
name: Check JavaScript for conformance with Prettier | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
prettier: | ||
biome: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
name: Configure npm caching | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-npm-${{ hashFiles('**/workflows/prettier.yml') }} | ||
restore-keys: | | ||
${{ runner.os }}-npm- | ||
- name: Run prettier | ||
run: |- | ||
npx prettier --check . | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Biome | ||
uses: biomejs/setup-biome@v1 | ||
- name: Run Biome | ||
run: biome ci . |
This file contains 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
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
{ | ||
"standard.semistandard": true, | ||
"standard.usePackageJson": true, | ||
"standard.autoFixOnSave": true, | ||
"javascript.validate.enable": false, | ||
"eslint.autoFixOnSave": true | ||
"editor.defaultFormatter": "biomejs.biome" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { expect, describe, it } from "@jest/globals"; | ||
|
||
import { packAndUnpack } from "./util"; | ||
|
||
import { objWithBlob } from "./data"; | ||
|
||
describe("Blobs", () => { | ||
it("replaces Blobs with ArrayBuffer ", async () => { | ||
const objWithAB = { | ||
...objWithBlob, | ||
blob: await objWithBlob.blob.arrayBuffer(), | ||
}; | ||
expect(await packAndUnpack(objWithBlob)).toStrictEqual(objWithAB); | ||
}); | ||
}); |
This file contains 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
Oops, something went wrong.