TypeScript 61.9%
HTML 37.2%
SQL 0.7%
1import { describe, expect, it } from 'vitest';2import meta from './meta.json' with { type: 'json' };3import { localMeta } from '../_lib/local-meta.js';4import { listFixtures, loadFixture, runFixtureSuite } from '@rareindex/connectors/testing';5import createConnector from './index.js';67const connector = createConnector(localMeta(meta));89describe('grand-archive', () => {10 runFixtureSuite(connector, it, expect);1112 it('emits one catalog item per edition/finish with publisher populations', async () => {13 const [name] = listFixtures('grand-archive');14 const out = await connector.normalize(loadFixture('grand-archive', name!).raw);15 expect(out.length).toBeGreaterThanOrEqual(1);16 for (const c of out) {17 if (c.kind !== 'catalog_item') throw new Error('expected catalog item');18 expect(c.attributes.categorySlug).toBe('other_tcg');19 expect(c.attributes.franchise).toBe('Grand Archive');20 expect(c.attributes.identifiers.gatcg_edition_id).toBeTruthy();21 // production quantity only when the publisher states an exact count22 if (c.attributes.productionQuantity !== null) expect(c.attributes.metadata.population_exact).toBe(true);23 }24 });25});26