Add unit tests.

I would suggest `assert.strictEqual` wherever applicable.