Skip to content

Commit

Permalink
Version 0.8.36 and test for sortFn.
Browse files Browse the repository at this point in the history
  • Loading branch information
aslagle committed Oct 4, 2016
1 parent 7dc039e commit 3849a8f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package.describe({
summary: "A reactive table designed for Meteor",
version: "0.8.35",
version: "0.8.36",
name: "aslagle:reactive-table",
git: "https://github.com/aslagle/reactive-table.git"
});
Expand Down
16 changes: 16 additions & 0 deletions test/test_fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,22 @@ Tinytest.add('Fields - virtual column sorting', function (test) {
);
});

Tinytest.add('Fields - sortFn', function (test) {
testTable(
{
collection: rows,
fields: [
{key: 'name', label: 'Sorted by Letters 2&3', sortFn: function (name) { return name.slice(1, 3); }}
]
},
function () {
test.equal($('.reactive-table tbody tr:first-child td').text(), "Marie Curie", "table should be sorted by fn by display full field");
test.equal($('.reactive-table tbody tr:nth-child(2) td').text(), "Carl Friedrich Gauss", "table should be sorted by fn but display full field");
test.equal($('.reactive-table tbody tr:nth-child(4) td').text(), "Nikola Tesla", "table should be sorted by fn but display full field");
}
);
});

Tinytest.add('Fields - virtual column html', function (test) {
testTable(
{
Expand Down

0 comments on commit 3849a8f

Please sign in to comment.