ruff-app-runner module provides you a facility for Ruff application developers to run application on their development machines. You may include this module with
var runner = require('ruff-app-runner');
Ruff app runner creates a virtual runtime built with
ruff-mock, which allows applicaiton developers to:
- Mock device data
Mock device can set its function’s return value, e.g:
- Verify device behavior
Upon code execution, invocation behavior can be verified by
- Trigger device event
Every mock device supports EventEmitter. Their events can be triggered by
For more mock details, you can refer to
ruff-mock module document.
appPathrefer to your applicaiton path that contains
runCallbackwill run once the virtual runtime has been created and your
readyfunction has been invoked.
endCallbackwill run once your
endfunction has been invoked.
You can ignore the
end part if you don’t need it.