Refactor `SessionManager` to make it more testable

Open
#490 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
api

Research direction

Start by locating SessionManager and compare its polling logic with the corresponding approach in SasViyaApiClient. Confirm the polling behavior and identify the unit-test boundary for mocked server responses; done means the logic is separated and can be tested independently.

Written by the indexing model from the issue text.

Description

We can move the polling logic from the SessionManager into a separate function like we did in the SasViyaApiClient. This will make it easier to unit test while mocking server responses etc.

Dominant language
TypeScript
Stars
41
Forks
3
Avg merge
8h 42m
Merged PRs (30d)
38

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sasjs/adapter

All issues in sasjs/adapter

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.