Improve code quality and write tests

This commit is contained in:
Shivam Mathur
2019-09-20 08:11:20 +05:30
parent db44db4b97
commit 43178a7254
3597 changed files with 255478 additions and 785554 deletions

29
node_modules/argv/build/full.sh generated vendored Normal file
View File

@ -0,0 +1,29 @@
#!/bin/bash
cd `dirname $0`
cd ../
SRCROOT=${PWD}
# Clean out and rebuild before running through each enviorment
make clean
echo "===== NVM DIR::: $NVM_DIR ===="
# Find each availiable node version and test with that version
for i in $( ls $NVM_DIR )
do
if [[ $i =~ ^v ]]; then
echo ""
echo ""
echo "=== Node $i ==="
echo ""
# Run test suite
"$NVM_DIR/$i/bin/node" "$SRCROOT/build/test.js"
# Any non successful exit should be treated as full error
RESULT=$?
if [[ $RESULT != 0 ]]; then
exit 1
fi
fi
done

1
node_modules/argv/build/lint.js generated vendored Normal file
View File

@ -0,0 +1 @@
require( 'nlint' ).render( __dirname + '/../' );

13
node_modules/argv/build/test.js generated vendored Normal file
View File

@ -0,0 +1,13 @@
global.munit = require( 'munit' );
global.argv = require( '../' );
// Only stop test suite when running make test
if ( ! process.env.NODE_TEST_NO_SKIP ) {
munit.defaults.settings.stopOnFail = true;
}
// Render all tests
munit.render( __dirname + '/../test/', {
junit: __dirname + '/results/',
junitPrefix: process.version.replace( /\./g, '_' )
});