Files
pdf-tools/tests/layoutStyles.test.ts

14 lines
481 B
TypeScript

import { readFile } from 'node:fs/promises';
import { describe, expect, it } from 'vitest';
describe('Toolbox layout styles', () => {
it('keeps the PDF workspace aligned to the 90rem shell width', async () => {
const stylesheet = await readFile('src/styles.css', 'utf8');
const mainRule = stylesheet.match(
/\.pdf-toolbox-shell \.toolbox-shell__main\s*\{(?<body>[^}]*)\}/u
);
expect(mainRule?.groups?.body).toMatch(/\bmax-width:\s*90rem\s*;/u);
});
});