test : added unit tests for getLinkedAccounts and getAllAccounts#795
test : added unit tests for getLinkedAccounts and getAllAccounts#795tmdeveloper007 wants to merge 4 commits into
Conversation
|
@TESTPERSONAL is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
fcba453 to
7d6fb44
Compare
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Import pattern is correct — function imported from source. Three infrastructure issues to fix before merge:
- Missing
"test": "vitest run"inpackage.jsonscripts — tests can't run in CI without this. vitest.config.tsmissingresolve.alias—@/lib/*path aliases fail without:
import path from 'path'
export default defineConfig({
resolve: { alias: { '@': path.resolve(__dirname, 'src') } },
test: { globals: true }
})- Missing EOF newline on test file.
ab9f004 to
fc6e84b
Compare
Closes Priyanshu-byte-coder#775 Added test/github-accounts-linked.test.ts covering: - getLinkedAccounts: empty array, all fields mapped, skips null decryption, defaults missing fields - getAllAccounts: primary at index 0, filters primary from linked by githubId, linked accounts after primary - getAccountToken: valid decryption, null on not found, null on decryption failure Impact: All 10 tests pass. Multi-account token resolution validated.
…test for type checking
|
This pull request is fully up-to-date with the latest upstream merges, all review items are addressed, local tests are passing cleanly, and it is fully ready to be merged! 🚀 |
Closes #775.
Summary of What Has Been Done:
Added test/github-accounts-linked.test.ts with 10 vitest tests covering getLinkedAccounts, getAllAccounts, and getAccountToken from src/lib/github-accounts.ts.
Changes Made:
New file: test/github-accounts-linked.test.ts
Test coverage:
Impact it Made:
All 10 tests pass. Multi-account token resolution validated.