ltsecurityinc安防产品在线商城代码
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user