Skip to content

Commit

Permalink
Add Unit Tests for Node SDK v7 beta (#488)
Browse files Browse the repository at this point in the history
This PR fixes the current testing framework and adds many more. Our testing coverage is around 90% now.

We now also have 2 new fixes that have been identified by the tests:
* Fix path for destroying a redirect URI
* Fix model for updating an Event
  • Loading branch information
mrashed-dev authored Oct 16, 2023
1 parent f21c496 commit 6c19e33
Show file tree
Hide file tree
Showing 20 changed files with 1,473 additions and 361 deletions.
8 changes: 8 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,12 @@ module.exports = {
settings: {
'import/extensions': ['.js'],
},
overrides: [
{
files: ['*.spec.ts'],
rules: {
'import/extensions': 'off',
},
},
],
};
4 changes: 2 additions & 2 deletions .github/workflows/pull-reqeust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:
pull_request:
branches:
- main
- v7-staging
- v7.0.0-beta

jobs:
checks:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 16.x, 18.x ]
node-version: [ 16.x, 18.x, 20.x ]
name: Nodejs ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

### 7.0.0-beta.3 / TBD
* Added support for the free-busy endpoint
* Fixed `getAvailability` response type
* Fix `getAvailability` response type
* Fix path for destroying a redirect URI
* Fix model for updating an Event

### 7.0.0-beta.2 / 2023-08-21
* Fix issue with getting the current Nylas SDK package version
Expand Down
9 changes: 7 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
const config = {
preset: 'ts-jest/presets/js-with-ts',
transform: {
'^.+\\\\.{ts|tsx}?$': [
'^.+\\.tsx?$': [
'ts-jest',
{
tsConfig: 'tsconfig.test.json',
tsconfig: 'tsconfig.test.json',
},
],
},
moduleNameMapper: {
'^[../]+src/([^/]+)$': '<rootDir>/lib/esm/$1.js',
'^[../]+src/resources/([^/]+)$': '<rootDir>/lib/esm/resources/$1.js',
'^[../]+src/models/([^/]+)$': '<rootDir>/lib/esm/models/$1.js',
},
coverageThreshold: {
global: {
functions: 80,
Expand Down
Loading

0 comments on commit 6c19e33

Please sign in to comment.