mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
24 lines
497 B
JavaScript
24 lines
497 B
JavaScript
var expect = require("chai").expect;
|
|
|
|
module.exports = function (helpers) {
|
|
var component = helpers.mount(require.resolve("./index"), {
|
|
colors: ["red", "green", "blue"],
|
|
});
|
|
|
|
expect(component.numberOfInvocations).to.equal(0);
|
|
|
|
component.input = {
|
|
colors: ["red", "blue"],
|
|
};
|
|
component.update();
|
|
|
|
expect(component.numberOfInvocations).to.equal(1);
|
|
|
|
component.input = {
|
|
colors: ["red"],
|
|
};
|
|
component.update();
|
|
|
|
expect(component.numberOfInvocations).to.equal(2);
|
|
};
|