File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,31 +50,17 @@ describe('rollup-plugin-node-polyfills', function () {
5050 } )
5151 } )
5252
53- // it('crypto option works (though is broken)', function (done) {
54- // rollup
55- // .rollup({
56- // input: 'test/examples/crypto-broken.js',
57- // plugins: [
58- // nodePolyfills({
59- // include: null,
60- // crypto: true
61- // })
62- // ]
63- // })
64- // .then(
65- // function () {
66- // done(new Error('should not get here'))
67- // },
68- // function (err) {
69- // if (
70- // err.message ===
71- // `"diffieHellman" is not exported by "\u0000polyfill-node.crypto.js", imported by "test/examples/crypto-broken.js".`
72- // ) {
73- // done()
74- // return
75- // }
76- // done(err)
77- // }
78- // )
79- // })
53+ test ( 'crypto option works (though is broken)' , async ( ) => {
54+ let err
55+ try {
56+ const bundle = await rolldown ( {
57+ input : 'test/examples/crypto-broken.js' ,
58+ plugins : [ nodePolyfills ( ) ]
59+ } )
60+ const generated = await bundle . generate ( { format : 'cjs' } )
61+ } catch ( e ) {
62+ return
63+ }
64+ throw new Error ( 'should not get here' )
65+ } )
8066} )
You can’t perform that action at this time.
0 commit comments