summaryrefslogtreecommitdiffhomepage
path: root/test/njs/import_from
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2023-05-10 13:02:52 +0100
committerAndrei Zeliankou <zelenkov@nginx.com>2023-05-10 13:02:52 +0100
commite88e16d11e8d197f27d292540a015cf05af6277f (patch)
tree158f93f7fc50ef72b85de44e879fef0e3c04d6fa /test/njs/import_from
parentdc0391441807c535e1f021263572128459a69d6a (diff)
downloadunit-e88e16d11e8d197f27d292540a015cf05af6277f.tar.gz
unit-e88e16d11e8d197f27d292540a015cf05af6277f.tar.bz2
Tests: added tests for NJS loadable modules.
Diffstat (limited to 'test/njs/import_from')
-rw-r--r--test/njs/import_from/script.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/njs/import_from/script.js b/test/njs/import_from/script.js
new file mode 100644
index 00000000..99d1b80e
--- /dev/null
+++ b/test/njs/import_from/script.js
@@ -0,0 +1,5 @@
+import cr from 'crypto';
+
+export default {
+ "num" : function () {return typeof cr.createHash('md5').digest().length}
+}