Move WidthCache measure container to helper container

This commit is contained in:
Thomas Zilz
2023-09-15 10:51:31 +02:00
parent 0e66d608a1
commit aaadefa548
5 changed files with 23 additions and 17 deletions
+2 -1
View File
@@ -36,7 +36,8 @@ function castf32(v: number): number {
describe('WidthCache', () => {
let wc: TestWidthCache;
beforeEach(() => {
wc = new TestWidthCache(new jsdom.JSDOM('').window.document);
const dom = new jsdom.JSDOM('');
wc = new TestWidthCache(dom.window.document, dom.window.document.createElement('div'));
wc.setFont('monospace', 15, 'normal', 'bold');
});
describe('cache invalidation', () => {