Tests for unique

These are new tests to demonstrate #1344. You'll want to remove the console.log statements before merging.