Skip to content
This repository was archived by the owner on Jul 30, 2026. It is now read-only.
This repository was archived by the owner on Jul 30, 2026. It is now read-only.

tests: 108 it.todo placeholders make the suite mostly aspirational #105

Description

@dobby-coder

Problem

npm test currently reports:

```
Test Files 2 passed | 7 skipped (9)
Tests 21 passed | 108 todo (129)
```

Per-file todo counts:

File it.todo
crypto-popup.test.ts 23
state.test.ts 18
encryption-flow.test.ts 21
decryption-flow.test.ts 19
message-routing.test.ts 11
detection.test.ts 8
sent-copy.test.ts 8

Each file is essentially a doc string of describe/it.todo lines with no implementation — the entire file gets skipped at runtime. As a result the suite gives a false sense of coverage: 21 passing tests, all in encoding.test.ts and utils.test.ts (pure helpers), while the encryption/decryption/state-management code that PR #68 specifically fixed has zero behavioural tests.

Suggested approach

Pick one of:

  1. Implement — wire up a minimal browser.* mock harness (most of these tests need browser.tabs, browser.compose, browser.windows, browser.storage.local). Starting with state.test.ts would cover the lifecycle code touched by PR fix: prevent unencrypted send when encryption is enabled #68. Issue Integration tests #53 ("Integration tests") tracks higher-level end-to-end coverage; this issue is the unit-test gap underneath it.
  2. Delete — if these will not be implemented soon, remove the placeholder files so the test report reflects reality. The todo list can move to a tracking issue or `tests/README.md`.

Mixing the two is also fine — the core problem is that all 108 are sitting in the suite as no-ops.

Files

  • `tests/crypto-popup.test.ts`
  • `tests/state.test.ts`
  • `tests/encryption-flow.test.ts`
  • `tests/decryption-flow.test.ts`
  • `tests/message-routing.test.ts`
  • `tests/detection.test.ts`
  • `tests/sent-copy.test.ts`

Related: #53.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions