mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
* Adjusts tests to no longer rely on CommonJS features. Switches them to ESM * Updates test initialization files to not double-initialize Jasmine now that bootstrap files are loaded after Jasmine. The `jasmine.boot` setup was hacky from `rules_nodejs` and will break in the future regardless if we e.g. use `rules_js` with actual unmodified `jasmine`. PR Close #48521
30 lines
1.1 KiB
Bash
Executable file
30 lines
1.1 KiB
Bash
Executable file
# compile closure test source file
|
|
$(npm bin)/tsc -p .
|
|
# Run the Google Closure compiler java runnable with zone externs
|
|
java -jar ./node_modules/google-closure-compiler-java/compiler.jar --flagfile './scripts/closure/closure_flagfile' --externs './build/zone_externs.js' --externs './node_modules/@externs/nodejs/v8/global.js' --process_common_js_modules
|
|
|
|
# the names of Zone exposed API should be kept correctly with zone externs, test program should exit with 0.
|
|
node build/closure/zone-closure-bundle.js
|
|
|
|
if [ $? -eq 0 ]
|
|
then
|
|
echo "Successfully pass closure compiler with zone externs"
|
|
else
|
|
echo "failed to pass closure compiler with zone externs"
|
|
exit 1
|
|
fi
|
|
|
|
# Run the Google Closure compiler java runnable without zone externs.
|
|
java -jar node_modules/google-closure-compiler-java/compiler.jar --flagfile 'scripts/closure/closure_flagfile' --externs './node_modules/@externs/nodejs/v8/global.js' --process_common_js_modules
|
|
|
|
node build/closure/zone-closure-bundle.js
|
|
|
|
if [ $? -eq 1 ]
|
|
then
|
|
echo "Successfully detect closure compiler error without zone externs"
|
|
else
|
|
echo "failed to detect closure compiler error without zone externs"
|
|
exit 1
|
|
fi
|
|
|
|
exit 0
|