Skip to content

tape runner does not support ESM files #514

@donmccurdy

Description

@donmccurdy

Reading #414 — which I realize is about writing Tape with ES modules, not testing ES modules — I found this suggestion:

#414 (comment)

In case someone stumbles upon this, passing --experimental-modules to tape works fine on windows (nix not available or I'd test). Even in a context such as this: npx tape --experimental-modules test/**/.mjs.

Testing now, in node.js v12.9.1 and macOS, I'm getting a silent failure when trying to use that. For example:

import test from 'tape';
// import * as test from 'tape';
// import { test } from 'tape';

test('test', function (t) {
  t.equal( 'test', 'test', 'it is a test' );
  t.end();
});
tape --experimental-modules my-test.js

Should this be supported? It may be worth noting that I also get no output running tape -v or tape -h. I'm not sure if that indicates a problem with my environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions