[Pkg-javascript-devel] Bug#1001550: Bug#1001550: node-mini-css-extract-plugin: FTBFS with webpack5: Error: FAIL test/TestCache.test.js

Pirate Praveen praveen at onenetbeyond.org
Sun Dec 12 14:38:57 GMT 2021



2021, ഡിസംബർ 12 9:56:05 AM IST, Ayoyimika Ajibade <ayoyimikaajibade at gmail.com>ൽ എഴുതി
>Source: node-mini-css-extract-plugin
>Version: 1.3.3-2
>Severity: important
>Justification: ftbfs
>Tags: ftbfs
>User: pkg-javascript-devel at alioth-lists.debian.net
>Usertags: webpack5
>
>
>Hi,
>
>We are starting to build against webpack5 in experimental and the 
>package needed for local build is webpack and node-webpack-source from 
>experimental.
>During a test rebuild, node-mini-css-extract-plugin was found to fail to 
>build in that situation due to a failing test.

There is a new upstream major release with support for webpack 5. So we just need to update this package to new upstream release.

>Relevant part (hopefully):
>
>    dh_auto_test --buildsystem=nodejs
>         mkdir -p node_modules
>         ln -s ../. node_modules/mini-css-extract-plugin
>         /bin/sh -ex debian/tests/pkg-js/test
>+ jest --ci -u test/HMR.test.js test/validate-plugin-options.test.js 
>test/normalize-url.test.js test/cjs.test.js test/TestCache.test.js
>PASS test/HMR.test.js
>PASS test/normalize-url.test.js
>FAIL test/TestCache.test.js (14.713 s)
>   ● TestCache › should work without cache
>
>     TypeError: Cannot set property register of #<Object> which has only 
>a getter
>
>       17 |       const originalRegister = 
>webpack.util.serialization.register;
>       18 |
>     > 19 |       webpack.util.serialization.register = jest
>          |       ^
>       20 |         .fn()
>       21 |         .mockImplementation((...args) => {
>       22 |           if (args[1].startsWith('mini-css-extract-plugin')) {
>
>       at Object.<anonymous> (test/TestCache.test.js:19:7)
>
>   ● TestCache › should work with the "memory" cache
>
>     TypeError: Cannot set property register of #<Object> which has only 
>a getter
>
>       139 |       const originalRegister = 
>webpack.util.serialization.register;
>       140 |
>     > 141 |       webpack.util.serialization.register = jest
>           |       ^
>       142 |         .fn()
>       143 |         .mockImplementation((...args) => {
>       144 |           if (args[1].startsWith('mini-css-extract-plugin')) {
>
>       at Object.<anonymous> (test/TestCache.test.js:141:7)
>
>   ● TestCache › should work with the "filesystem" cache
>
>     TypeError: Cannot set property register of #<Object> which has only 
>a getter
>
>265 |       const originalRegister = webpack.util.serialization.register;
>       266 |
>     > 267 |       webpack.util.serialization.register = jest
>           |       ^
>       268 |         .fn()
>       269 |         .mockImplementation((...args) => {
>       270 |           if (args[1].startsWith('mini-css-extract-plugin')) {
>
>       at Object.<anonymous> (test/TestCache.test.js:267:7)
>
>   ● TestCache › should work with the "filesystem" cache and asset modules
>
>     TypeError: Cannot set property register of #<Object> which has only 
>a getter
>
>       395 |       const originalRegister = 
>webpack.util.serialization.register;
>       396 |
>     > 397 |       webpack.util.serialization.register = jest
>           |       ^
>       398 |         .fn()
>       399 |         .mockImplementation((...args) => {
>       400 |           if (args[1].startsWith('mini-css-extract-plugin')) {
>
>       at Object.<anonymous> (test/TestCache.test.js:397:7)
>
>   ● TestCache › should work with the "filesystem" cache and file-loader
>
>     TypeError: Cannot set property register of #<Object> which has only 
>a getter
>
>       531 |       const originalRegister = 
>webpack.util.serialization.register;
>       532 |
>     > 533 |       webpack.util.serialization.register = jest
>           |       ^
>       534 |         .fn()
>       535 |         .mockImplementation((...args) => {
>       536 |           if (args[1].startsWith('mini-css-extract-plugin')) {
>
>       at Object.<anonymous> (test/TestCache.test.js:533:7)
>
>PASS test/cjs.test.js (11.213 s)
>PASS test/validate-plugin-options.test.js (18.275 s)
>
>Test Suites: 1 failed, 4 passed, 5 total
>Tests:       5 failed, 79 passed, 84 total
>Snapshots:   40 passed, 40 total
>Time:        24.04 s
>Ran all test suites matching 
>/test\/HMR.test.js|test\/validate-plugin-options.test.js|test\/normalize-url.test.js|test\/cjs.test.js|test\/TestCache.test.js/i.
>dh_auto_test: error: /bin/sh -ex debian/tests/pkg-js/test returned exit 
>code 1
>make: *** [debian/rules:8: binary] Error 25
>dpkg-buildpackage: error: debian/rules binary subprocess returned exit 
>status 2
>
>The full log is attached to this mail
>

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



More information about the Pkg-javascript-devel mailing list