Skip to content

invertase/candidate-test

Repository files navigation

Token Manager - Debugging Challenge

Overview

This project contains a TokenManager class that handles authentication token lifecycle, including automatic refresh when tokens expire. However, there are several bugs causing test failures.

To run this test you will require the following installed on your machine:

Your Task

Attempt to get the tests green/passing. There is also a memory leak bug that isn't captured by the tests if you can spot it. But the most valuable aspect is documenting in the JOURNAL.md as described below.

IMPORTANT: Document Your Work

You MUST use JOURNAL.md to document:

  • Each issue/bug you identify
  • Why you're making each change
  • Your reasoning and approach
  • Any code snippets you think are relevant

Make a journal entry for each commit. This is a critical part of the assessment.

The Code

  • src/TokenManager.ts - Token management class (has bugs - fix this!)
  • src/mockApi.ts - Mock Firebase API (don't modify)
  • __tests__/TokenManager.test.ts - Test suite (don't modify)

Getting Started

# Install dependencies
npm install

# Run tests in watch mode (tests auto-rerun when you save changes)
npm run test:watch
# or not in watch mode
npm test

Submission

  1. Attempt to get tests passing
  2. Ensure JOURNAL.md has notes for each commit
  3. Submit your solution

Good luck! 🚀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published