QUnit tests

- [x] Basic tests
- [ ] DOM tests

Addresses #1