The Selenium tests are high-level functional/integration tests, not unit tests. Unit tests run much more quickly and test the JS API rather than the in-browser behavior of the JS.