diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c14f1e..188d999 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,6 +25,8 @@ jobs: run: npm ci - name: Check code style run: npm run lint + - name: Run unit tests + run: npm test - name: Build Package run: npm run package:lib env: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index df897d4..6992ad1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,6 +2,23 @@ Contributions to SASjs are very welcome! When making a PR, test cases should be included. +## Code Style + +This repository uses `Prettier` to ensure a uniform code style. +If you are using VS Code for development, you can automatically fix your code to match the style as follows: + +- Install the `Prettier` extension for VS Code. +- Open your `settings.json` file by choosing 'Preferences: Open Settings (JSON)' from the command palette. +- Add the following items to the JSON. + ``` + "editor.formatOnSave": true, + "editor.formatOnPaste": true, + ``` + +If you are using another editor, or are unable to install the extension, you can run `npm run lint:fix` to fix the formatting after you've made your changes. + +## Testing + This repository contains a suite of tests built using [@sasjs/test-framework](https://github.com/sasjs/test-framework). Detailed instructions for creating and running the tests can be found [here](https://github.com/sasjs/adapter/blob/master/sasjs-tests/README.md). diff --git a/src/SASjs.ts b/src/SASjs.ts index 578ff96..138e0f1 100644 --- a/src/SASjs.ts +++ b/src/SASjs.ts @@ -194,7 +194,9 @@ export default class SASjs { linesOfCode, contextName, accessToken, - silent + silent, + null, + this.sasjsConfig.debug ) } diff --git a/src/SessionManager.ts b/src/SessionManager.ts index 6d073ce..fc3eb56 100644 --- a/src/SessionManager.ts +++ b/src/SessionManager.ts @@ -69,7 +69,7 @@ export class SessionManager { createSessionRequest ) - await this.waitForSession(createdSession, etag) + await this.waitForSession(createdSession, etag, accessToken) this.sessions.push(createdSession) return createdSession }