summaryrefslogtreecommitdiff
path: root/test/parallel/test-internal-modules.js
diff options
context:
space:
mode:
authorVladimir Kurchatkin <vladimir.kurchatkin@gmail.com>2015-02-14 22:53:34 +0300
committerVladimir Kurchatkin <vladimir.kurchatkin@gmail.com>2015-03-25 22:12:18 +0300
commit2db758c562b4e480acc2d1a654e2c471a653a039 (patch)
treed220a3b9b05d1682dcd1fecfd446ed69c5a599b8 /test/parallel/test-internal-modules.js
parent45814216ee29b8d6c5faa00c6d27b721f628a1ea (diff)
downloadandroid-node-v8-2db758c562b4e480acc2d1a654e2c471a653a039.tar.gz
android-node-v8-2db758c562b4e480acc2d1a654e2c471a653a039.tar.bz2
android-node-v8-2db758c562b4e480acc2d1a654e2c471a653a039.zip
iojs: introduce internal modules
Internal modules can be used to share private code between public modules without risk to expose private APIs to the user. PR-URL: https://github.com/iojs/io.js/pull/848 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test/parallel/test-internal-modules.js')
-rw-r--r--test/parallel/test-internal-modules.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/parallel/test-internal-modules.js b/test/parallel/test-internal-modules.js
new file mode 100644
index 0000000000..ebba2500d5
--- /dev/null
+++ b/test/parallel/test-internal-modules.js
@@ -0,0 +1,8 @@
+var common = require('../common');
+var assert = require('assert');
+
+assert.throws(function() {
+ require('internal/freelist');
+});
+
+assert(require('../fixtures/internal-modules') === 42);