Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Add and fix tests for Backend/Base/*: #43

Merged
merged 6 commits into from
Nov 15, 2020
Merged

Tests: Add and fix tests for Backend/Base/*: #43

merged 6 commits into from
Nov 15, 2020

Conversation

emibcn
Copy link
Owner

@emibcn emibcn commented Nov 15, 2020

  • Backend/Base/Cache:
    • Tests: abstract and move fetch mocking code and AbortError definition to testHelpers and use it
    • Code: Use Backend/Base/Common as a base class of FetchCacheElement
  • Backend/Base/Common:
    • Tests: Add tests
    • Code:
      • Fix bug in handleFetchErrors (throw Error instead of return it)
      • Abstract a bit to allow using it as base class in FetchCacheElement
  • Backend/Base/GHPages:
    • Tests: Add tests
    • Code:
      • Move conditional log logic to log function
      • Return some async functions return value and await to some function calls to allow await on it and simplify tests
  • testHelpers: Transform message console log catchers to wrap async functions (works well for non-async functions, too)
  • ErrorCatcher: Use message console log catchers as async functions

- Backend/Base/Cache:
  - Tests: abstract and move fetch mocking code and AbortError definition to `testHelpers` and use it
  - Code: Use Backend/Base/Common as a base class of FetchCacheElement
- Backend/Base/Common:
  - Tests: Add tests
  - Code:
    - Fix bug in handleFetchErrors (throw Error instead of return it)
    - Abstract a bit to allow using it as base class in FetchCacheElement
- Backend/Base/GHPages:
  - Tests: Add tests
  - Code:
    - Move conditional log logic to `log` function
    - Return some async functions return value and await to some function calls to allow `await` on it and simplify tests
- testHelpers: Transform message console log catchers to wrap async functions (works well for non-async functions, too)
- ErrorCatcher: Use message console log catchers as `async` functions
@emibcn emibcn linked an issue Nov 15, 2020 that may be closed by this pull request
31 tasks
@emibcn emibcn merged commit d69e6e2 into master Nov 15, 2020
@emibcn emibcn deleted the add-tests branch November 15, 2020 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add unit tests with jest
1 participant