mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
21 lines
495 B
JavaScript
21 lines
495 B
JavaScript
var expect = require('chai').expect;
|
|
|
|
module.exports = {
|
|
onInput: function(input) {
|
|
expect(input.name).to.eql('Frank');
|
|
this.state = { count:0 };
|
|
this.setUpTest();
|
|
},
|
|
|
|
onMount: function(config) {
|
|
expect(this.state.count).to.eql(0);
|
|
expect(this.foo).to.eql('bar');
|
|
expect(this.array).to.eql([1,2,3]);
|
|
this.onMountCalled = true;
|
|
},
|
|
|
|
setUpTest: function() {
|
|
this.foo = 'bar';
|
|
this.array = [1,2,3];
|
|
}
|
|
}; |