Page MenuHomeSoftware Heritage

Add tests for the Web Labels webpack plugin
Closed, MigratedEdits Locked

Description

swh-web contains a custom webpack plugin enabling to generate a Web Labels table to state the licenses of all the Javascript files loaded by an application compiled with webpack.

This plugin lacks testing to ensure it will not break as new webpack versions wil be released.

A first bite on this was made by @vlorentz in D1215.

Other type of tests could consist in compiling a sample webpack application and check the
Web Labels table is correctly generated with the expected content.

Event Timeline

LibreJS now has a command line tool compliance.js that should help with testing.

git clone https://git.savannah.gnu.org/git/librejs.git
npm install -g browserify
cargo install geckodriver
cd librejs
npm install acorn-loose jssha browserify selenium-webdriver geckodriver
export PATH=$PATH:./node_module/.bin
./build.sh
node ./compliance.js https://www.softwareheritage.org/