[Pkg-javascript-devel] Bug#1011973: Bug#1011973: node-webpack-sources: autopkgtest failure TypeError: addMapping is not a function

Pirate Praveen praveen at onenetbeyond.org
Sat May 28 20:23:47 BST 2022



On ശ, മേയ് 28 2022 at 10:25:18 വൈകു +05:30:00 
+05:30:00, Akshay S Dinesh <akshay at learnlearn.in> wrote:
> 
>> 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
> 

package.json has

 "files": [
    "lib/",
    "!lib/helpers/__mocks__"

So this directory is excluded from the deb. We can add this to 
debian/tests/pkg-js/files to include it in autopkgtest environment. I'm 
trying this now.

> 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