On 11/12/2021 16:21, Pirate Praveen wrote:


On ശ, ഡിസം 11 2021 at 01:48:18 വൈകു +0100 +0100, Julien Puydt <julien.pu...@gmail.com> wrote:
Hi,

Le samedi 11 décembre 2021 à 13:24 +0100, Yadd a écrit :

 echo -n require > debian/tests/pkg-js/SKIP

Good one!

How does one test an import-able module?

Create test.mjs as
import {loadJsonFile} from 'load-json-file';

node test.mjs

or more generic
import * as loadJSONFile from 'load-json-file';

or even simpler

import 'load-json-file';

This does not work with node 12

--
Pkg-javascript-devel mailing list
Pkg-javascript-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Reply via email to