mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
23 lines
547 B
JavaScript
23 lines
547 B
JavaScript
var expect = require('chai').expect;
|
|
|
|
module.exports = {
|
|
onMount: function() {
|
|
this.name = 'app-legacy-button';
|
|
|
|
var logOutput = this.logOutput = [];
|
|
|
|
function log(data) {
|
|
logOutput.push(data);
|
|
}
|
|
|
|
this.log = log;
|
|
this.clicked = false;
|
|
},
|
|
|
|
handleRootMouseDown: function(event, el) {
|
|
this.clicked = true;
|
|
expect(el.getAttribute('class')).to.equal('app-legacy-button');
|
|
this.log('click');
|
|
expect(this.name).to.equal('app-legacy-button');
|
|
}
|
|
}; |