// Tests for Syndria98/dragonroll#64, the second round of modifications to the character sheet: // * the tab rail hangs off the border of the window instead of standing inside the sheet body, // * the armor class, the speed, the proficiency bonus and the initiative bonus stand under the // portrait, together with the hit points and the hit dice, both drawn as bars. // // The window is a `.vue` file and the repository root installs no dependencies for it, so its // template and styles are read out of the source the way tests/character-sheet-tabs.test.js reads // them. The plain functions the sheet and the route work out their numbers with are lifted out of // those sources and called, the way tests/map-viewer.test.js runs a service it cannot import. // // 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 read = (...parts) => fs.readFileSync(path.join(__dirname, "..", ...parts), "utf8"); const sheetSource = read("frontend", "app", "components", "windows", "CharacterSheetWindow.vue"); const script = /