提交 31063dea 编写于 作者: M Mislav Marohnić

Show error message when trying to run test suite without dependencies

If someone just cloned this project, they might be tempted to
`script/server` and try to run the test suite immediately. That won't
work, because they have to run `make` first to obtain all npm and bower
dependencies. However, they would get a blank HTML page which would be
confusing because it's not immediately apparent what they did wrong.

Now, an error message is rendered that suggests you should run `make`.
上级 12a50fda
......@@ -10,8 +10,12 @@
<script src="/node_modules/chai/chai.js"></script>
<script src="/node_modules/mocha/mocha.js"></script>
<script>
mocha.setup('tdd')
self.assert = chai.assert
if (self.mocha && mocha.setup) {
mocha.setup('tdd')
self.assert = chai.assert
} else {
document.write('<p>Error: please run <code>make</code> to install dependencies and try again.</p>')
}
</script>
<script src="/bower_components/es6-promise/promise.js"></script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册