Skip to content

Fix TypeScript lint errors in @astronlabs/notify test files #16

Description

@Dydex

CI lint is failing in packages/notify with the following errors:

src/CursorState.test.ts(30,5): error TS2552: Cannot find name 'update'. Did you mean 'Date'?
src/FilterEngine.test.ts(18,3): error TS2304: Cannot find name 'beforeEach'.
src/SubscriptionManager.test.ts(9,3): error TS2304: Cannot find name 'beforeEach'.
src/integration.test.ts(72,11): error TS6133: 'eventReceived' is declared but its value is never read.
src/integration.test.ts(75,34): error TS2554: Expected 2 arguments, but got 1.
src/integration.test.ts(75,46): error TS7006: Parameter 'event' implicitly has an 'any' type.

Root Causes

  • Missing Vitest types (beforeEach, etc.) — likely missing @types/vitest or vitest/globals in tsconfig
  • Unused variable eventReceived in integration test
  • Wrong argument count on a callback
  • Incorrect variable name update in CursorState test

Fix

  • Add "types": ["vitest/globals"] to packages/notify/tsconfig.json
  • Fix unused variable and argument errors in test files

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions