Skip to content

Commit

Permalink
Up AssetView tests
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Sep 1, 2023
1 parent 192d184 commit 6d1a492
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Assets from 'asset_manager/model/Assets';
import AssetView from 'asset_manager/view/AssetView';
import Assets from '../../../../src/asset_manager/model/Assets';
import AssetView from '../../../../src/asset_manager/view/AssetView';

describe('AssetView', () => {
let testContext;
let testContext: { view?: AssetView };

beforeEach(() => {
testContext = {};
Expand All @@ -14,20 +14,20 @@ describe('AssetView', () => {
testContext.view = new AssetView({
config: {},
model,
});
} as any);
document.body.innerHTML = '<div id="fixtures"></div>';
document.body.querySelector('#fixtures').appendChild(testContext.view.render().el);
document.body.querySelector('#fixtures')!.appendChild(testContext.view.render().el);
});

afterEach(() => {
testContext.view.remove();
testContext.view!.remove();
});

test('Object exists', () => {
expect(AssetView).toBeTruthy();
});

test('Has correct prefix', () => {
expect(testContext.view.pfx).toEqual('');
expect(testContext.view!.pfx).toEqual('');
});
});

0 comments on commit 6d1a492

Please sign in to comment.