@@ -14,6 +14,23 @@ MOCHA_OPTIONS = --recursive --ui bdd --timeout 1000
1414.DEFAULT_GOAL : quality
1515
1616
17+ # FIXME: "Error [ERR_REQUIRE_ESM]"
18+ # ```
19+ # /path/to/javascript-testing/test/tape/tape.mjs:1
20+ # Error [ERR_REQUIRE_ESM]: Must use import to load ES module: file:///path/to/javascript-testing/test/tape/tape.mjs
21+ # at Module.load (internal/modules/cjs/loader.js:599:32)
22+ # at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
23+ # at Function.Module._load (internal/modules/cjs/loader.js:530:3)
24+ # at Module.require (internal/modules/cjs/loader.js:637:17)
25+ # ```
26+ # ... even in Node 8
27+ # saw this before with an upgrade to [email protected] 28+ # https://github.com/standard-things/esm/issues/868
29+ # does not help: https://github.com/standard-things/esm/issues/868#issuecomment-657965217
30+ # it's likely that `esm` / `@std/esm` is just not meant for 'blended' projects
31+ # abandonning, for now (╯°□°)╯︵ ┻━┻
32+
33+
1734init :
1835 @mkdir -p $(ROOT ) /build/mongodb
1936
@@ -29,7 +46,9 @@ tape-cjs:
2946 @NODE_ENV=test $(NODE_BIN ) /tape ' test/bootstrap.js' ' test/tape/*.js'
3047tape-esm :
3148 @NODE_ENV=test $(NODE_BIN ) /tape -r esm ' test/bootstrap.js' ' test/tape/*.mjs'
32- tape : tape-cjs tape-esm
49+ # # FIXME: "Error [ERR_REQUIRE_ESM]"
50+ # tape: tape-cjs tape-esm
51+ tape : tape-cjs
3352
3453
3554# https://mochajs.org/#usage
@@ -40,21 +59,23 @@ mocha-esm:
4059 @NODE_ENV=test $(NODE_BIN ) /mocha $(MOCHA_OPTIONS ) --reporter dot \
4160 -r esm \
4261 " $( ROOT) /test/bootstrap.js" " $( ROOT) /test/mocha/*.mjs"
43- mocha : mocha-cjs mocha-esm
62+ # # FIXME: "Error [ERR_REQUIRE_ESM]"
63+ # mocha: mocha-cjs mocha-esm
64+ mocha : mocha-cjs
4465
4566
4667# https://jestjs.io/docs/en/cli
4768# @see package.json + { jest }
4869jest :
4970 @NODE_ENV=test $(NODE_BIN ) /jest --config jest.config.js
50- # TODO: ESM variant
71+ # TODO: jest-esm
5172
5273
5374# https://jestjs.io/docs/en/cli
5475# @see package.json + { ava }
5576ava :
5677 @NODE_ENV=test $(NODE_BIN ) /ava
57- # TODO: ESM variant
78+ # TODO: ava-esm
5879
5980
6081lint :
6485
6586quality : test lint
6687
67- # # no *-esm tests
68- # ci: tape-cjs mocha-cjs jest ava lint
69- # # all the good stuff
70- # ci: test lint
71- ci : quality
88+ ci : test lint
7289
7390
7491lock :
0 commit comments