summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPirate Praveen <praveen@debian.org>2020-12-15 20:38:44 +0530
committerPirate Praveen <praveen@debian.org>2020-12-15 21:06:36 +0530
commitf82d0ba94e46ae3d07472b54e8c86d87244ad736 (patch)
tree985fe04231298f875bea7998a5232b80eafe9f90
parent64e4e6ad4350a5048ab422e28a7da80d00d8f015 (diff)
Enable tests using @babel/register instead of esm
-rw-r--r--debian/control2
-rw-r--r--debian/nodejs/extlinks1
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/use-babel-register-for-esm.patch10
-rw-r--r--debian/tests/pkg-js/test3
5 files changed, 15 insertions, 2 deletions
diff --git a/debian/control b/debian/control
index fb83a1f..686262c 100644
--- a/debian/control
+++ b/debian/control
@@ -10,6 +10,8 @@ Build-Depends: debhelper-compat (= 12),
pkg-js-tools (>=0.9.16~),
rollup,
node-rollup-plugin-terser,
+ node-tape <!nocheck>,
+ node-babel7 <!nocheck>
Standards-Version: 4.5.1
Vcs-Browser: https://salsa.debian.org/js-team/node-d3-geo
Vcs-Git: https://salsa.debian.org/js-team/node-d3-geo.git
diff --git a/debian/nodejs/extlinks b/debian/nodejs/extlinks
new file mode 100644
index 0000000..f9763ed
--- /dev/null
+++ b/debian/nodejs/extlinks
@@ -0,0 +1 @@
+@babel/register
diff --git a/debian/patches/series b/debian/patches/series
index 774a9a2..f614161 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
reproducible_build.diff
+use-babel-register-for-esm.patch
diff --git a/debian/patches/use-babel-register-for-esm.patch b/debian/patches/use-babel-register-for-esm.patch
new file mode 100644
index 0000000..c5fc899
--- /dev/null
+++ b/debian/patches/use-babel-register-for-esm.patch
@@ -0,0 +1,10 @@
+Transform to commonjs using @babel/register instead of esm
+
+--- /dev/null
++++ b/.babelrc
+@@ -0,0 +1,5 @@
++{
++ "plugins": [
++ "@babel/transform-modules-commonjs",
++ ],
++}
diff --git a/debian/tests/pkg-js/test b/debian/tests/pkg-js/test
index 62b74fa..fb6f1d8 100644
--- a/debian/tests/pkg-js/test
+++ b/debian/tests/pkg-js/test
@@ -1,2 +1 @@
-# tape 'test/**/*.js'
-echo "Tests are disabled because topojson-client is not packaged"
+tape -r @babel/register 'test/**/*.js'