From 4d089773460723ce97393de7e7b2e5b7294784a5 Mon Sep 17 00:00:00 2001 From: Muffin Date: Tue, 15 Aug 2023 09:52:41 -0500 Subject: [PATCH] Fix tests --- test/integration/tw_font_manager.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/integration/tw_font_manager.js b/test/integration/tw_font_manager.js index 739765a42a0..00ada7d174e 100644 --- a/test/integration/tw_font_manager.js +++ b/test/integration/tw_font_manager.js @@ -1,12 +1,24 @@ const fs = require('fs'); const path = require('path'); const {test} = require('tap'); -const makeTestStorage = require('../fixtures/make-test-storage'); +const _makeTestStorage = require('../fixtures/make-test-storage'); const Runtime = require('../../src/engine/runtime'); const VirtualMachine = require('../../src/virtual-machine'); const emptyProjectFixture = path.join(__dirname, '..', 'fixtures', 'tw-empty-project.sb3'); +const makeTestStorage = () => { + const storage = _makeTestStorage(); + storage.DataFormat.TTF = 'ttf'; + storage.AssetType.Font = { + contentType: 'application/x-font-ttf', + name: 'Font', + runtimeFormat: storage.DataFormat.TTF, + immutable: true + }; + return storage; +}; + test('isValidFamily', t => { const {fontManager} = new Runtime(); t.ok(fontManager.isValidFamily('Roboto'));