add contents

This commit is contained in:
Trevor Batley
2025-10-09 15:04:29 +11:00
parent 170362eec1
commit bce7dd054a
2537 changed files with 301282 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
/* eslint-env qunit */
window.edittable = window.edittable || {};
(function (edittable) {
'use strict';
QUnit.module('Tests for edittable.addRowToMeta');
QUnit.test('Add one row to the top', function (assert) {
var meta = [
[
{ 'tag': 'th', 'colspan': 1, 'rowspan': 1 },
{ 'tag': 'th', 'colspan': 1, 'rowspan': 1 }
],
[
{ 'tag': 'td', 'colspan': 1, 'rowspan': 1 },
{ 'tag': 'td', 'colspan': 1, 'rowspan': 1 }
]
];
var actual_result = edittable.addRowToMeta(0,1,meta);
var expected_result = [
[
{
'colspan': 1,
'rowspan': 1
},
{
'colspan': 1,
'rowspan': 1
}
],
[
{
'colspan': 1,
'rowspan': 1,
'tag': 'th'
},
{
'colspan': 1,
'rowspan': 1,
'tag': 'th'
}
],
[
{
'colspan': 1,
'rowspan': 1,
'tag': 'td'
},
{
'colspan': 1,
'rowspan': 1,
'tag': 'td'
}
]
];
assert.deepEqual(actual_result, expected_result);
});
}(window.edittable));