mithril-vndb/tests/index.html
Pierre-Yves Gerardy aeb5f05706 Add the old test suite to the grunt task for both local tests and CI
This relies on a hack to bypass the `mocha` detection by `grunt-mocha-phantomjs`.
The tests have to run in less than 10 seconds, which is unlikely to be problematic on current
hardware.

Alternatively, adding the following to tests/index.html also makes the old test suite compatible
with the mocha runner, but it entails loading `mocha`:

    <script src="../node_modules/mocha/mocha.js"></script>
    <script>
        mocha.setup("bdd")
        describe("dummy test", function(){
            it("is a dummy test to run the old test suite with grunt-mocha-phantomjs like the new one", function(){})
        })
        mocha.run()
    </script>
2016-09-11 16:21:45 +02:00

14 lines
486 B
HTML

<!doctype html>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.0.3/es5-shim.min.js"></script>-->
<script src="test.js"></script>
<script src="mock.js"></script>
<script src="../mithril.js"></script>
<script src="mithril-tests.js"></script>
<script>
// shim for running the old test suite with grunt-mocha-phantomjs like the new one
if ('callPhantom' in window) {
window.callPhantom({ testRunEnded: 1})
}
</script>
<p>Open the console to see the test report</p>