stats step 3: elections, party positions and opinion feeds (schema, collectors, timers); world-opinions data moved into stats.wo_*
All checks were successful
Deploy production / deploy (push) Successful in 1m12s

This commit is contained in:
2026-10-25 22:16:25 +00:00
parent 030f3c08ee
commit 42c9351ebd
37 changed files with 75721 additions and 892 deletions

View File

@@ -1,8 +1,14 @@
import { describe, expect, it } from 'vitest';
import world from 'world-atlas/countries-110m.json';
import { countries, countryById, narratives, parties, partyCountries, profiles } from './data';
import seed from '../../../scripts/stats/world-opinions-seed.json';
import { buildWorldOpinions, type WorldOpinionsData } from './data';
describe('world opinions data', () => {
// The guide's content lives in stats.wo_*; this checks the snapshot the stats_wo_seed migration
// was generated from (scripts/stats/world-opinions-seed.json).
const { countries, countryById, narratives, parties, partyCountries, profiles } =
buildWorldOpinions(seed as WorldOpinionsData);
describe('world opinions seed', () => {
it('has unique country ids and ISO codes', () => {
expect(new Set(countries.map((country) => country.id)).size).toBe(countries.length);
expect(new Set(countries.map((country) => country.iso)).size).toBe(countries.length);