Free and Open source Web Builder Framework. Next generation tool for building templates without coding
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

33 lines
755 B

import Assets from 'asset_manager/model/Assets';
import AssetView from 'asset_manager/view/AssetView';
describe('AssetView', () => {
let testContext;
beforeEach(() => {
testContext = {};
});
beforeEach(() => {
var coll = new Assets();
var model = coll.add({ src: 'test' });
testContext.view = new AssetView({
config: {},
model,
});
document.body.innerHTML = '<div id="fixtures"></div>';
document.body.querySelector('#fixtures').appendChild(testContext.view.render().el);
});
afterEach(() => {
testContext.view.remove();
});
test('Object exists', () => {
expect(AssetView).toBeTruthy();
});
test('Has correct prefix', () => {
expect(testContext.view.pfx).toEqual('');
});
});