diff js_paths.t @ 1751:18ac4d9e5a2a

Tests: rewriting njs tests without deprecated "js_include".
author Dmitry Volyntsev <xeioex@nginx.com>
date Thu, 09 Dec 2021 17:36:29 +0000
parents bc0990ea2e5b
children
line wrap: on
line diff
--- a/js_paths.t
+++ b/js_paths.t
@@ -38,18 +38,18 @@ http {
     js_path "%%TESTDIR%%/lib1";
     js_path "lib2";
 
-    js_include test.js;
+    js_import test.js;
 
     server {
         listen       127.0.0.1:8080;
         server_name  localhost;
 
         location /test {
-            js_content test;
+            js_content test.test;
         }
 
         location /test2 {
-            js_content test2;
+            js_content test.test2;
         }
     }
 }
@@ -73,6 +73,8 @@ EOF
         r.return(200, m3.sum(r.args.a, r.args.b));
     }
 
+    export default {test, test2};
+
 EOF
 
 my $d = $t->testdir();