Tests vars-on-top

This commit is contained in:
Amine Ben hammou
2017-09-27 15:10:51 +00:00
parent 4e2e9f6f8f
commit 9b41641e97
17 changed files with 88 additions and 51 deletions

View File

@@ -23,6 +23,7 @@ define([
});
it('uses defaults from config when they are set', function () {
var model;
global.stubConfig(EditorApplication, {
blockDefaults: {
text: {
@@ -30,16 +31,18 @@ define([
}
}
});
var model = new (TextBlock.TextBlockModel)();
model = new (TextBlock.TextBlockModel)();
expect(model.get('text')).to.equal('some custom config text');
});
});
describe('block view', function () {
var model;
var view;
global.stubConfig(EditorApplication);
var model = new (TextBlock.TextBlockModel)();
var view = new (TextBlock.TextBlockView)({model: model});
model = new (TextBlock.TextBlockModel)();
view = new (TextBlock.TextBlockView)({model: model});
it('renders', function () {
expect(view.render).to.not.throw();