Sha256: ac7ac767b963e9540943238faf091d81ba04b09f3ed406f3e6cb58b91d700df1
Contents?: true
Size: 726 Bytes
Versions: 13
Compression:
Stored size: 726 Bytes
Contents
/*global buster, assert, gts*/ buster.testCase("Abbrev", { "returns short enough string": function () { assert.equals("Some string", gts.abbrev("Some string", 30)); }, "slices off end of too long string": function () { assert.equals("Some", gts.abbrev("Some string", 4)); }, "inserts padding in place of cut content": function () { assert.equals("Some...", gts.abbrev("Some string", 7, "...")); }, "does not insert padding if string is short enough": function () { assert.equals("Some string", gts.abbrev("Some string", 11, "...")); }, "does not cut words": function () { assert.equals("Some...", gts.abbrev("Some string", 10, "...")); } });
Version data entries
13 entries across 13 versions & 1 rubygems