Skip to content

shared: add missing getPlatform() type-check helper and unit tests #9

@ShantKhatri

Description

@ShantKhatri

Summary

Extend packages/shared/src/platforms.ts with a helper function to safely test platform presence and add corresponding tests.

Tasks

  • add export function isSupportedPlatform(id: string): boolean to platforms.ts using PLATFORMS[id] !== undefined.
  • add tests in packages/shared/src/__tests__/platforms.test.ts for existing/unknown platform IDs.

Acceptance Criteria

  • helper is exported and tests pass.
  • this is low-risk contribution and improves API discoverability.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions