// Tests for Syndria98/dragonroll#53: the item row in the campaign sidebar dropped its "SYNCED" // text badge and now leads with the item's own icon on the left of the entry. // // The repository root installs no dependencies, so these read the sidebar component the way // tests/sidebar-entity-entry.test.js does — the checks are about the markup and style of the row. // // Run with `npm test` from the repository root, or `node --test tests/`. const { test } = require("node:test"); const assert = require("node:assert/strict"); const fs = require("node:fs"); const path = require("node:path"); const source = fs.readFileSync( path.join(__dirname, "..", "frontend", "app", "components", "partials", "ContentSidebar.vue"), "utf8" ); // The block that renders the item rows, from the items section down to its closing template. The // items section is followed by the maps section (`v-else`), so the first `` that leads // there ends it; the inner `v-for` close is followed by another close, not by `v-else`. const itemSection = /