Skip to content

Commit 8b4ecad

Browse files
committed
Tests: fixed js_internal_redirect.t TODO.
1 parent 31e4c9a commit 8b4ecad

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

js_internal_redirect.t

+9-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ http {
4141
listen 127.0.0.1:8080;
4242
server_name localhost;
4343
44+
location /njs {
45+
js_content test.njs;
46+
}
47+
4448
location /test {
4549
js_content test.redirect;
4650
}
@@ -59,6 +63,10 @@ http {
5963
EOF
6064

6165
$t->write_file('test.js', <<EOF);
66+
function test_njs(r) {
67+
r.return(200, njs.version);
68+
}
69+
6270
function redirect(r) {
6371
if (r.variables.arg_dest == 'named') {
6472
r.internalRedirect('\@named');
@@ -79,7 +87,7 @@ $t->write_file('test.js', <<EOF);
7987
}
8088
}
8189
82-
export default {redirect};
90+
export default {njs:test_njs, redirect};
8391
8492
EOF
8593

0 commit comments

Comments
 (0)