Commit 11b1a8d
authored
feat(shared): add isSupportedPlatform helper and unit tests (#555)
* feat(shared): add isSupportedPlatform helper and unit tests
- Add exported isSupportedPlatform helper to platforms.ts
- Add tests in __tests__/platforms.test.ts for existing and unknown platform IDs
Closes #9
* fix(shared): address Copilot review feedback on isSupportedPlatform
- Use Object.prototype.hasOwnProperty.call for safer own-property check
- Remove redundant per-platform assertions covered by the loop test
- Rename misleading test description to reflect casing check intent
* fix(shared): add vitest types to tsconfig for IDE type resolution1 parent 82a256c commit 11b1a8d
3 files changed
Lines changed: 31 additions & 1 deletion
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
275 | 280 | | |
276 | 281 | | |
277 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
0 commit comments