Corrected test combine process; was not including tests in ease-full.js
parent
d6cca75093
commit
0ccab4f8d9
|
@ -24,7 +24,7 @@
|
|||
|
||||
var common = require( './common' ),
|
||||
assert = require( 'assert' ),
|
||||
mb_common = require( './inc-member_builder-common' )
|
||||
mb_common = require( __dirname + '/inc-member_builder-common' )
|
||||
;
|
||||
|
||||
mb_common.value = function() {};
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
var common = require( './common' ),
|
||||
assert = require( 'assert' ),
|
||||
mb_common = require( './inc-member_builder-common' )
|
||||
mb_common = require( __dirname + '/inc-member_builder-common' )
|
||||
;
|
||||
|
||||
mb_common.value = { bar: 'baz' };
|
||||
|
|
|
@ -99,11 +99,11 @@ if [ "$INC_TEST" ]; then
|
|||
# note that not all tests are included
|
||||
TEST_CASES=$( find $PATH_TEST \
|
||||
\( -name 'test-*.js' \
|
||||
-name 'inc-*.js' \
|
||||
! -name 'test-combine.js' \
|
||||
! -name 'test-index.js' \
|
||||
-o -name 'inc-*.js' \
|
||||
\) \
|
||||
-exec basename {} \; \
|
||||
| sort \
|
||||
| grep -v 'test-\(combine\|index\).js' \
|
||||
)
|
||||
|
||||
# include test combine template
|
||||
|
@ -116,15 +116,21 @@ if [ "$INC_TEST" ]; then
|
|||
for testcase in $TEST_CASES; do
|
||||
filename="$PATH_TEST/$testcase"
|
||||
|
||||
# generate the module name by removing path and extension, then
|
||||
# prefixing it with "test/"
|
||||
module="${filename%.*}"
|
||||
module="test/${module##*/}"
|
||||
|
||||
# each module must be enclosed in a closure to emulate a module
|
||||
echo "/** TEST CASE: $testcase **/"
|
||||
echo "( function()"
|
||||
echo "( function( module, __dirname )"
|
||||
echo "{"
|
||||
echo " var exports = module.exports = {};"
|
||||
|
||||
# add the module, removing trailing commas
|
||||
cat $filename | $RMTRAIL
|
||||
|
||||
echo "} )();"
|
||||
echo "} )( module['$module'] = {}, 'test' );"
|
||||
done
|
||||
|
||||
echo "};"
|
||||
|
|
Loading…
Reference in New Issue