Skip to content

Commit eba71cb

Browse files
committed
Tests: TODO js_promise.t on njs < 0.3.8.
1 parent 70f490e commit eba71cb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

js_promise.t

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ http {
5555
location /sub_token {
5656
js_content sub_token;
5757
}
58+
59+
location /njs {
60+
js_content test_njs;
61+
}
5862
}
5963
}
6064
@@ -160,14 +164,24 @@ $t->write_file('test.js', <<EOF);
160164
r.return(parseInt(code), '{"token": "'+ token +'"}');
161165
}
162166
167+
function test_njs(r) {
168+
r.return(200, njs.version);
169+
}
170+
163171
EOF
164172

165173
$t->try_run('no njs available')->plan(3);
166174

167175
###############################################################################
168176

177+
TODO: {
178+
local $TODO = 'not yet'
179+
unless http_get('/njs') =~ /^([.0-9]+)$/m && $1 ge '0.3.8';
180+
169181
like(http_get('/promise'), qr/{"token": "b"}/, "Promise");
170182
like(http_get('/promise_throw'), qr/{"token": "x"}/, "Promise throw and catch");
171183
like(http_get('/timeout'), qr/{"token": "R"}/, "Promise with timeout");
172184

185+
}
186+
173187
###############################################################################

0 commit comments

Comments
 (0)