This commit is contained in:
2026-09-15 10:26:34 +08:00
commit ecf36afa56
10493 changed files with 1404888 additions and 0 deletions
@@ -0,0 +1,21 @@
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
define([], function () {
'use strict';
/**
* Function used to be a placeholder for mage-init directive.
*/
function fn() {
fn.testCallback.apply(fn, arguments);
}
/**
* Function whose call wll be tested.
*/
fn.testCallback = function () {};
return fn;
});
@@ -0,0 +1,15 @@
{
"base": {
"nodeId": "mage-init-node",
"dataAttr": "data-mage-init",
"containerId": "test-suite-container"
},
"fn": {
"nodeData": {
"tests/assets/apply/components/fn": {
"baz": "foo"
}
},
"timeout": 20
}
}
@@ -0,0 +1,22 @@
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
define([
'tests/assets/tools',
'tests/assets/apply/components/fn',
'text!./config.json',
'text!./templates/node.html'
], function (tools, fnComponent, config, nodeTmpl) {
'use strict';
var preset;
preset = tools.init(config, {
'fn': nodeTmpl
});
preset.fn.component = fnComponent;
return preset;
});
@@ -0,0 +1,10 @@
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<div id="<%= containerId %>">
<div id="<%= nodeId %>"
<%= dataAttr %>='<%= JSON.stringify(nodeData) %>'></div>
</div>