You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
330 B

4 years ago
  1. var unique = require("../uniq.js")
  2. require("tape")("unique", function(t) {
  3. t.equals(unique([1,1,2,3,5,5,7]).join(), [1,2,3,5,7].join())
  4. t.equals(unique([]).join(), [].join())
  5. t.equals(unique([1,1,1]).join(), [1].join())
  6. t.equals(unique([1,1,1,2,2,2], function(a,b) { return (a^b)&1 }).join(), [2,1].join())
  7. t.end()
  8. })