Switch style test to pass in jsdom

This should be testing approximately the same thing and passes in Jest.

Test Plan: Cherry-pick Jest config from #1528 and verify that running `jest`.