Adding back missing unit tests.
Copying unit tests to root of JS dir.
Merge branch 'test-fix'