refactor(04): move rank.test.ts into tests/ mirror dir (convention + dist hygiene)

src/lib/rank.test.ts was the last co-located API test. The API tsconfig excludes
tests/ from the build, so all test files belong there; a test in src/ gets compiled
into dist/ and vitest then runs the stale compiled copy (the source of phantom
'22 todo' and dist sourcemap warnings). Moving it to tests/lib/ matches convention
and leaves zero test files in src/, so the production build no longer emits test
artifacts. Updated rank.test.ts path refs in phase-04 plan docs.
This commit is contained in:
Lucas Berger
2026-06-09 13:40:11 -04:00
parent ca9e97879f
commit 690f0b95c0
5 changed files with 20 additions and 20 deletions
@@ -2,11 +2,11 @@
* Unit tests for rank.ts fractional-indexing helpers (D-13).
*
* Pure function tests, no DB needed.
* Run: pnpm --filter @familysync/api exec vitest run src/lib/rank.test.ts
* Run: pnpm --filter @familysync/api exec vitest run tests/lib/rank.test.ts
*/
import { describe, it, expect } from 'vitest'
import { rankForAppend, rankBetween } from './rank.js'
import { rankForAppend, rankBetween } from '../../src/lib/rank.js'
describe('rankForAppend', () => {
it('returns "a0" when list is empty (no existing rank)', () => {