mirror of
https://github.com/ariya/phantomjs.git
synced 2024-10-26 14:29:13 +03:00
75944c8d47
This works with more //! directives at the top of a test, which will normally be a no-harness test. It is now possible, for instance, to test for an _unsuccessful_ exit, or for output appearing on stderr rather than stdout. The tests for phantom.exit and sys.stdin/out/err have been augmented accordingly. It is also now possible to adjust the backstop timeout on a per-test basis, and therefore the existing timeouts have been lowered to 5s (harness), 7s (backstop). Part of issue #13478 (test suite overhaul).
10 lines
236 B
JavaScript
10 lines
236 B
JavaScript
//! no-harness
|
|
//! expect-exit: 0
|
|
//! expect-stdout: "we are alive"
|
|
//! expect-stdout-fails
|
|
|
|
var sys = require('system');
|
|
sys.stdout.write("we are alive\n");
|
|
phantom.exit();
|
|
sys.stdout.write("ERROR control passed beyond phantom.exit");
|