Our tests should be running in real browsers as well as Node #2359
Labels
Area: Workflow
For anything dealing with Mithril's internal tooling, including the mocks and bundler, but not ospec
Type: Bug
For bugs and any other unexpected breakage
Type: Meta/Feedback
For high-level discussion around the project and/or community itself
We need to start testing our code in real browsers and in ES5 environments to avoid issues like this, reported on Gitter. It'd also make it much easier to detect and test for IE bugs, if we could get on either BrowserStack's or Sauce Labs' open source plans, but we first need to get our end together so we can even use it.
Here's the state of everything:
<script src="..."></script>
.require
pseudo-polyfill that doesn't even wrap modules in a closure when executing them.This is low priority for now, but I am working on it partially in my local Rollup migration branch (slated for a future PR). Here's my plan, some of which I've already got resolved locally:
npm test
load the generated test bundle before executing tests in Node.karma-ospec
to tell Karma how to handle ospec resultsev.preventDefault()
is as simple as checkingev.defaultPrevented
ev.stopPropagation()
is as simple as firing an event that can propagate and ensuring it doesn't get found by the parent.valueSetter
andtypeSetter
spies could just be replaced with an interim hack forelem.value
andinput.type
, which we'd remove once we incorporate IE into the test matrix. (We can do this on Travis with their early stage Windows CI support, but note that Edge is not available without something like Sauce Labs or BrowserStack.)As for the above, I only locally have the first done completely and the second done for
/api/tests/*.js
only.The text was updated successfully, but these errors were encountered: