@@ -64,6 +64,11 @@ http {
6464 js_content fun;
6565 }
6666
67+ location /test_exception {
68+ js_import exception.js;
69+ js_content exception.nonexistent;
70+ }
71+
6772 location /test_var {
6873 return 200 $test;
6974 }
@@ -105,6 +110,11 @@ $t->write_file('fun.js', <<EOF);
105110
106111EOF
107112
113+ $t -> write_file(' exception.js' , <<EOF );
114+ export default {nonexistent};
115+
116+ EOF
117+
108118$t -> write_file(' main.js' , <<EOF );
109119 function version(r) {
110120 r.return(200, njs.version);
@@ -127,11 +137,13 @@ like(http_get('/test_lib'), qr/LIB-TEST/s, 'lib.test');
127137like(http_get(' /test_fun' ), qr / FUN-TEST/ s , ' fun' );
128138like(http_get(' /proxy/test_fun' ), qr / FUN-TEST/ s , ' proxy fun' );
129139like(http_get(' /test_var' ), qr / P-TEST/ s , ' foo.bar.p' );
140+ http_get(' /test_exception' );
141+ http_get(' /test_exception' );
130142
131143$t -> stop();
132144
133145my $content = $t -> read_file(' error.log' );
134146my $count = () = $content =~ m / js vm init/ g ;
135- ok($count == 4 , ' uniq js vm contexts' );
147+ ok($count == 5 , ' uniq js vm contexts' );
136148
137149# ##############################################################################
0 commit comments