1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/uniq/test/test.js

11 lines
330 B
JavaScript
Raw Normal View History

2023-12-18 13:12:25 +08:00
var unique = require("../uniq.js")
require("tape")("unique", function(t) {
t.equals(unique([1,1,2,3,5,5,7]).join(), [1,2,3,5,7].join())
t.equals(unique([]).join(), [].join())
t.equals(unique([1,1,1]).join(), [1].join())
t.equals(unique([1,1,1,2,2,2], function(a,b) { return (a^b)&1 }).join(), [2,1].join())
t.end()
})