I would just take the example and make what assertions I could. Of course, I would make this more than one test, not just a giant one. I'm going to write this mostly in pseudocode assuming that the utility methods have obvious implementations.
var data = [['a', 10],
var wl = new WeightedList(data);
// wl.peek() returns items at random from the list, and does not modify the list.
var result = wl.peek(); // Ex: ['a']
var result = wl.peek(3); // Ex: ['a', 'c', 'd']
// wl.pop() returns random items from the list and removes the items it found
var result = wl.pop(2); // Ex: ['a', 'd'], after which wl consists of [ ['b', 1], ['c', 1], ['e', 3] ]
// wl.push() adds new data into the set
// note that despite the terms push and pop, the weighted list has no natural order
wl.push('f', 6); // wl is now [ ['b', 1], ['c', 1], ['e', 3], ['f', 6] ]
// wl.addWeight() will increase the weight of a list item (or decrease it if the user passes a negative number)
wl.addWeight('b', 4); // wl is now [ ['b', 5], ['c', 1], ['e', 3], ['f', 6] ]
// I doubt you can assert much here but no exception
// wl.shuffle() will return the entire list in random order.
result = wl.shuffle(); // Ex: ['b', 'f', 'c', 'e']
Also, if the weights are not drastically different, you can repeat some of the operations many times and assert that you got all the values inside the WeightedList at some point. You just have to make sure that you repeat it enough that there is a very high probability they will appear. I would suggest a quick very high estimate of how many times you expect to run the test (say 100 times a day for a decade). Make the probability of failure one in that many runs. All you need to make sure is that the probability of this code failing due to bad luck with the random values is on the same order as the probability of failure due to a bug. Then you will not greatly increase your failure rate.