mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
24 lines
552 B
JavaScript
24 lines
552 B
JavaScript
var expect = require("chai").expect;
|
|
|
|
module.exports = function (helpers) {
|
|
var component = helpers.mount(require.resolve("./index.marko"), {
|
|
$global: {
|
|
pathname: "/",
|
|
},
|
|
});
|
|
|
|
expect(component.getEl("current").innerHTML).to.equal("Pathname: /");
|
|
|
|
component.input = {
|
|
$global: {
|
|
pathname: "/test",
|
|
},
|
|
};
|
|
component.update();
|
|
|
|
expect(component.getEl("current").innerHTML).to.equal("Pathname: /test");
|
|
};
|
|
|
|
module.exports.skip_hydrate =
|
|
"When hydrating, only one $global value can be passed. This test uses 2.";
|