Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Aug 15, 2023
1 parent d6b5302 commit 4d08977
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion test/integration/tw_font_manager.js
Original file line number Diff line number Diff line change
@@ -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'));
Expand Down

0 comments on commit 4d08977

Please sign in to comment.