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
All checks were successful
Deploy production / deploy (push) Successful in 1m12s
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user