[Pkg-javascript-devel] Bug#1011973: node-webpack-sources: autopkgtest failure TypeError: addMapping is not a function
Akshay S Dinesh
akshay at learnlearn.in
Sat May 28 17:55:18 BST 2022
> with node-source-map 0.7 built from salsa master branch, there is only
> 1 failure. 26 tests were failing earlier with node-source-map 0.6.
>
This is a red herring.
The autopkgtest fails aren't related to node-source-map at all.
Specifically, the tests don't fail in gbp buildpackage, but only in
autopkgtest, that too only in one particular stage.
That's because the __mocks__ that jest relies on are in the lib/helpers/
directory and that's not available somehow to the autopkgtest run. For
example, if you do autopkgtest with --shell-fail and after it fails copy
__mocks__ to /usr/share/nodejs/webpack-sources/lib/helpers and rerun the
test with /usr/share/pkg-js-autopkgtest/runner it passes
You can replicate it by downloading upstream code and removing
`__mocks__` folder and running yarnpkg test
https://wiki.debian.org/ContinuousIntegration/AutopkgtestBestPractices#Recommendations
> Use upstream test-suite if they have as-installed test
The jest tests are not as-installed
More information about the Pkg-javascript-devel
mailing list