import { describe, expect, it } from 'vitest'; import meta from './meta.json' with { type: 'json' }; import { localMeta } from '../_lib/local-meta.js'; import { expectMapping, storeSuite } from '../_g4-shops-intl-lib/suite.js'; import createConnector from './index.js'; const parsed = localMeta(meta); const connector = createConnector(parsed); describe('crepslocker', () => { // Framework fixture suite + store invariants (currency, categories, listings only, stable ids). storeSuite(parsed, connector, it, expect); it('maps live-observed titles onto taxonomy slugs and skips accessories/apparel', async () => { await expectMapping(parsed, connector, expect, [ { "title": "Preloved - Air Jordan 1 Retro High OG Bred Toe", "collection": "air-jordan", "type": "Trainers", "tags": [ "Air Jordan", "Condition: Very good", "preloved" ], "variant": "UK 9", "expect": "nike_jordan", "brand": "Jordan" }, { "title": "Nike Dunk Low Retro Black White Panda 2021", "collection": "nike-dunk", "type": "Trainers", "variant": "UK 6 | EU 39 / Black", "expect": "nike_jordan", "brand": "Nike" }, { "title": "Preloved - Adidas Yeezy Boost 350 Pirate Black (2015)", "collection": "preloved-footwear", "type": "Trainers", "expect": "adidas_yeezy", "brand": "adidas Yeezy", "year": 2015 }, { "title": "Dior B22 Sneakers White Blue", "collection": "footwear", "type": "Trainers", "expect": "new_balance_asics_other" }, { "title": "Swatch x Audemars Piguet Royal Pop Ocho Negro With Rubber Strap", "collection": "watches", "type": "Watches", "expect": "other_watches", "brand": "Swatch" }, { "title": "Pokemon Mega Evolution Pitch Black Booster Pack (Random Pack Art)", "collection": "pokemon", "type": "Collectables", "expect": "pokemon" }, { "title": "Supreme x Jordan Black Track Jacket (SS26)", "collection": "air-jordan", "type": "Coats & Jackets", "expect": null }, { "title": "Cartier Santos Sunglasses Gold", "collection": "footwear", "type": "Sunglasses", "expect": null } ]); }); });