// Tests for Syndria98/dragonroll#83, the things the character sheet did not hold: // * the eighteen skills down the ability scores tab, each with a circle that stands lit // when the character is proficient with it, and the six saving throws beside them, // * proficiencies with tools and with languages, // * the coins a character carries and the icon of each item it carries, // * and traits that reach the campaign from the linked Foundry world. // // The window is a `.vue` file and the repository root installs no dependencies for it, so // its template, styles and plain functions are read out of the source the way // tests/character-sheet-tabs.test.js and tests/character-sheet-portrait-column.test.js // read them. The Foundry mapper is plain CommonJS and is required for real; the actor // route runs in a stubbed `require` against fake models, like tests/foundry-force-import.test.js. // The Foundry module goes into a `node:vm` context with stubbed globals, like // tests/foundry-sync-toggle.test.js, so what its actor snapshot carries is observable. // // 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 vm = require("node:vm"); const read = (...parts) => fs.readFileSync(path.join(__dirname, "..", ...parts), "utf8"); const MODULE_ID = "dragonroll-foundry"; const sheetSource = read("frontend", "app", "components", "windows", "CharacterSheetWindow.vue"); const script = /