JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.jquery.com/qunit/qunit-git.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-git.css">
<body>
<h1 id="qunit-header">QUnit example</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="qunit-fixture">test markup, will be hidden</div>
</body>
JavaScript
function process(lst) {
for (var i=0;i<lst.length;i++) {
lst[i] = lst[i]*2;
}
return lst;
}
var ret_list = jQuery.map([[1,2,3],[4,5,6],[7,8,9]],function(item) { return process(item)});
var expected_result = [[2,4,6],[8,10,12],[14,16,18]];
var flattened_result = [2,4,6,8,10,12,14,16,18];
module("jQuery.map test");
test("Test to check expected behaviour", function() {
expect(1);
deepEqual(ret_list,expected_result);
});
test("Test to show current behaviour", function() {
expect(1);
deepEqual(ret_list,flattened_result);
});