// The token names and URLs in src/shared/tokenList.js are written from // script/lib/token-enrichment.json by script/lib/apply-enrichment.js // (`make apply-enrichment`). The committed list must be exactly what it writes // from the committed data, so the list, the data and the script cannot drift // apart. const fs = require("fs"); const path = require("path"); const enrichment = require("../script/lib/token-enrichment.json"); const { applyEnrichment } = require("../script/lib/apply-enrichment"); test("src/shared/tokenList.js is what make apply-enrichment writes from the committed data", () => { const committed = fs.readFileSync( path.join(__dirname, "..", "src/shared/tokenList.js"), "utf8", ); expect(applyEnrichment(committed, enrichment)).toBe(committed); });