Skip to content

Commit 6ec96fd

Browse files
authored
chore: upload test coverage to coveralls (#1006)
## What kind of change does this PR introduce? Upload coverage report to coveralls, check https://coveralls.io/github/supabase/auth-js for uploaded report.
1 parent e8cda31 commit 6ec96fd

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
matrix:
1717
os: [ubuntu-latest]
18-
node: ['18', '20']
18+
node: ["18", "20"]
1919

2020
runs-on: ${{ matrix.os }}
2121

@@ -35,3 +35,9 @@ jobs:
3535
- name: Run tests
3636
run: |
3737
npm t
38+
39+
- name: Upload coverage results to Coveralls
40+
uses: coverallsapp/github-action@master
41+
with:
42+
github-token: ${{ secrets.GITHUB_TOKEN }}
43+
path-to-lcov: ./test/coverage/lcov.info

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"build:module": "tsc -p tsconfig.module.json",
3131
"lint": "eslint ./src/**/* test/**/*.test.ts",
3232
"test": "run-s test:clean test:infra test:suite test:clean",
33-
"test:suite": "jest --runInBand",
33+
"test:suite": "jest --runInBand --coverage",
3434
"test:infra": "cd infra && docker compose down && docker compose pull && docker compose up -d && sleep 30",
3535
"test:clean": "cd infra && docker compose down",
3636
"docs": "typedoc src/index.ts --out docs/v2 --excludePrivate --excludeProtected",

src/lib/helpers.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ export function uuid() {
1414
})
1515
}
1616

17-
export const isBrowser = () =>
18-
typeof window !== 'undefined' && typeof document !== 'undefined'
17+
export const isBrowser = () => typeof window !== 'undefined' && typeof document !== 'undefined'
1918

2019
const localStorageWriteTests = {
2120
tested: false,

0 commit comments

Comments
 (0)