Skip to content

Commit

Permalink
Add TypeScript declarations test
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilianoSanchez committed Nov 6, 2024
1 parent f384cb8 commit c5571df
Show file tree
Hide file tree
Showing 5 changed files with 390 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
- name: npm Check
run: npm run check

- name: npm ts tests
run: npm run test-ts-decls

- name: npm Test
run: npm run test

Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTORS-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ The project includes unit as well as integration tests for browser environments.

All tests can be run at once with the command `npm run test`.

If you've updated the TypeScript declaration files (`/types`), you should add some lines verifying the updates in `/ts-tests/index.ts` and then run the TypeScript compilation test using the `npm run test-ts-decls` command.

For additional testing scripts or to get more insight on how these work, please refer to our [package.json](package.json) file.

### Linting and other useful checks
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"build": "npm run build:cjs && npm run build:esm",
"build:esm": "rimraf esm && tsc -m es2015 --outDir esm",
"build:cjs": "rimraf cjs && tsc -m CommonJS --outDir cjs",
"test-ts-decls": "tsc --build ts-tests",
"test": "jest",
"test:coverage": "jest --coverage",
"all": "npm run check && npm run build && npm run test",
Expand Down
Loading

0 comments on commit c5571df

Please sign in to comment.