Moved unit tests outside of tests/.

Now they're next to their matching JS file.