# HG changeset patch # User Sergey Kandaurov # Date 1522687637 -10800 # Node ID 890516ca898a3cca79afd7fde6636446ac1e6819 # Parent b6d941ff65f489666ebb374b481f03400eb5c81d Tests: reverted 3882f8f3b2bc to unbreak with njs 0.1.15. diff -r b6d941ff65f4 -r 890516ca898a js.t --- a/js.t Fri Mar 30 18:08:23 2018 +0300 +++ b/js.t Mon Apr 02 19:47:17 2018 +0300 @@ -178,9 +178,7 @@ } function test_log(req, res) { - req.log("SEE-THIS-LOG"); - req.warn("SEE-THIS-WARN"); - req.error("SEE-THIS-ERROR"); + req.log("SEE-THIS"); } function test_except(req, res) { @@ -263,7 +261,7 @@ EOF -$t->try_run('no njs available')->plan(24); +$t->try_run('no njs available')->plan(22); ############################################################################### @@ -304,9 +302,7 @@ $t->stop(); -ok(index($t->read_file('error.log'), 'SEE-THIS-LOG') > 0, 'log js'); -ok(index($t->read_file('error.log'), 'SEE-THIS-WARN') > 0, 'warn js'); -ok(index($t->read_file('error.log'), 'SEE-THIS-ERROR') > 0, 'error js'); +ok(index($t->read_file('error.log'), 'SEE-THIS') > 0, 'log js'); ok(index($t->read_file('error.log'), 'at fs.readFileSync') > 0, 'js_set backtrace'); ok(index($t->read_file('error.log'), 'at JSON.parse') > 0, diff -r b6d941ff65f4 -r 890516ca898a stream_js.t --- a/stream_js.t Fri Mar 30 18:08:23 2018 +0300 +++ b/stream_js.t Mon Apr 02 19:47:17 2018 +0300 @@ -133,9 +133,7 @@ } function js_log(sess) { - sess.log("SEE-THIS-LOG"); - sess.warn("SEE-THIS-WARN"); - sess.error("SEE-THIS-ERROR"); + sess.log("SEE-THIS"); } function js_access_allow(sess) { @@ -201,7 +199,7 @@ EOF $t->run_daemon(\&stream_daemon, port(8090)); -$t->try_run('no stream njs available')->plan(16); +$t->try_run('no stream njs available')->plan(14); $t->waitforsocket('127.0.0.1:' . port(8090)); ############################################################################### @@ -225,9 +223,7 @@ $t->stop(); -ok(index($t->read_file('error.log'), 'SEE-THIS-LOG') > 0, 'stream js log'); -ok(index($t->read_file('error.log'), 'SEE-THIS-WARN') > 0, 'stream js warn'); -ok(index($t->read_file('error.log'), 'SEE-THIS-ERROR') > 0, 'stream js error'); +ok(index($t->read_file('error.log'), 'SEE-THIS') > 0, 'stream js log'); ok(index($t->read_file('error.log'), 'at fs.readFileSync') > 0, 'stream js_preread backtrace'); ok(index($t->read_file('error.log'), 'at js_filter_except') > 0,