Files
hanzo.ai/e2e/unit/counts.spec.ts
zeekay b082379a0f counts: one definition of how many repositories we have, read from GitHub today
The landing said 686 public repositories (non-fork, not archived) while other
pages said 800+ (every public repository, forks included): two numbers for one
thing, and 125 of the 825 were other people's code. Both now count the public
repositories we wrote, forks left out and archived kept: 725 across the twelve
organizations, so pages say 700+. The activity block reads that same set, so its
commit total gains the archived repositories' history: 84,505 commits in the
year, 380 this week, 166 repositories with a commit this month. Models are
557, as /v1/models answers today.
2026-10-27 01:35:13 -07:00

16 lines
934 B
TypeScript

import { readFileSync } from 'node:fs'
import { test, expect } from '@playwright/test'
import { MODEL_COUNT, MODEL_FLOOR, REPO_COUNT, REPO_FLOOR } from '../../lib/counts'
/** The constants in lib/counts.ts are the snapshots, not a second opinion. */
test('model and repository counts are the committed snapshots, and the landing counts the same repositories', () => {
const served = JSON.parse(readFileSync('lib/data/served.json', 'utf8')) as { served: unknown[] }
const oss = JSON.parse(readFileSync('lib/data/oss.json', 'utf8')) as { repos: number; originals: number }
expect(served.served.length).toBe(MODEL_COUNT)
expect(Math.floor(MODEL_COUNT / 100) * 100).toBe(MODEL_FLOOR)
expect(oss.originals).toBe(REPO_COUNT)
expect(Math.floor(REPO_COUNT / 100) * 100).toBe(REPO_FLOOR)
const stats = JSON.parse(readFileSync('lib/data/oss-stats.json', 'utf8')) as { repos: number }
expect(stats.repos).toBe(oss.originals)
})