Le 09/07/2019 à 21:22, Xavier a écrit :
> Le 09/07/2019 à 11:27, Pirate Praveen a écrit :
>>
>>
>> On 2019, ജൂലൈ 9 2:12:43 PM IST, Xavier <y...@debian.org> wrote:
>>> Hello,
>>>
>>> pkg-js-autopkgtest launches 2 tests:
>>> - a `node -e 'require("package")'
>>> - upstream tests on installed files
>>>
>>> is it enough ?
>>
>> For packages that only provide commonjs/umd modules, that should be enough.
>>
>> For packages that also provide ES module, we should test they are installed 
>> properly. This can be confirmed if package.json has a "module" field or not. 
>>
>> We could write a ES6 js file with import * from "package" and run rollup on 
>> it as node does not natively support import yet.
>>
>> es-module-test.js:
>>
>> import * from "package"
>>
>> Then run,
>>
>> rollup es-module-test.js -f umd -o bundle.js
>>
>> Or possibly,
>> es-module-test.mjs:
>> import * from "package"
>>
>> node --experimental-modules  es-module-test.js
>>
>> Note: not tested the code
> 
> OK, `import foo from "d3-dsv"` works fine.
> Do I have to launch this test every time a "module" exists in package.json ?
> 
> Cheers,
> Xavier

Pushed to experimental, let's test it !

-- 
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