mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
17 lines
476 B
JavaScript
17 lines
476 B
JavaScript
var expect = require('chai').expect;
|
|
|
|
module.exports = function(helpers, done) {
|
|
var widget = helpers.mount(require('./index'), {
|
|
size: 'large',
|
|
label: 'Initial Label'
|
|
});
|
|
|
|
expect(widget.el.className).to.contain('large');
|
|
widget.setSize('small');
|
|
expect(widget.el.className).to.not.contain('small');
|
|
|
|
require('marko/widgets').onAfterUpdate(function() {
|
|
expect(widget.el.className).to.contain('small');
|
|
done();
|
|
});
|
|
}; |