summaryrefslogtreecommitdiff
path: root/tests/registry/npm/@denotest/binary-package/1.0.0
diff options
context:
space:
mode:
Diffstat (limited to 'tests/registry/npm/@denotest/binary-package/1.0.0')
-rw-r--r--tests/registry/npm/@denotest/binary-package/1.0.0/index.js13
-rw-r--r--tests/registry/npm/@denotest/binary-package/1.0.0/package.json10
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/registry/npm/@denotest/binary-package/1.0.0/index.js b/tests/registry/npm/@denotest/binary-package/1.0.0/index.js
new file mode 100644
index 000000000..5870118e7
--- /dev/null
+++ b/tests/registry/npm/@denotest/binary-package/1.0.0/index.js
@@ -0,0 +1,13 @@
+const packageByOs = {
+ "darwin": "@denotest/binary-package-mac",
+ "linux": "@denotest/binary-package-linux",
+ "win32": "@denotest/binary-package-windows",
+}
+
+const selectedPackage = packageByOs[process.platform];
+
+if (!selectedPackage) {
+ throw new Error("trying to run on unsupported platform");
+}
+
+require(selectedPackage); \ No newline at end of file
diff --git a/tests/registry/npm/@denotest/binary-package/1.0.0/package.json b/tests/registry/npm/@denotest/binary-package/1.0.0/package.json
new file mode 100644
index 000000000..dc8859bb4
--- /dev/null
+++ b/tests/registry/npm/@denotest/binary-package/1.0.0/package.json
@@ -0,0 +1,10 @@
+{
+ "name": "@denotest/binary-package",
+ "version": "1.0.0",
+ "main": "index.js",
+ "optionalDependencies": {
+ "@denotest/binary-package-linux": "1.0.0",
+ "@denotest/binary-package-mac": "1.0.0",
+ "@denotest/binary-package-windows": "1.0.0"
+ }
+}