jbeard4 / SCION

SCXML/Statecharts in JavaScript, moved to gitlab: https://gitlab.com/scion-scxml/scion
https://scion.scxml.io
Apache License 2.0
149 stars 29 forks source link

Report data model (aka javascript) compilation errors before the FSM is executed #361

Closed mattoshry closed 8 years ago

mattoshry commented 8 years ago

This behavior is only enabled when the reportAllErrors option is explicitly set to true in the xxxToModel APIs.

jbeard4 commented 8 years ago

This looks good. Could you please submit a platform-test that exercises context.reportAllErrors?

Right now, there are two forms of tests in SCION:

You can use https://github.com/jbeard4/SCION/tree/cleanup-platform-tests/test/platform-tests/node/require as an example of how to write a test.

Please put the new test in: test/platform-tests/node/catch-script-syntax-errors-on-compile/

This test can have any format, but please ensure that the directory contains a nodeunit test script called runner.js

I have added preliminary automation support for travis. You can pull from my branch to get these changes: https://github.com/jbeard4/SCION/tree/cleanup-platform-tests

If you have any questions, please don't hesitate to ask. Thank.

mattoshry commented 8 years ago

Added installation of nodeunit to run-tests-node.sh to fix the build 430 failure. build 431 passes on 3/4 platforms. It fails on node@0.11 due scxml-test-framework/test/parallel+interrupt/test24.scxml. Please take a look.

jbeard4 commented 8 years ago

Will review this evening. Thanks.

mattoshry commented 8 years ago

I kicked the build, and this time node@0.11 passed. The other versions passed as well.