autotest-js.sh 617 B

12345678910111213141516171819202122
  1. #!/usr/bin/env bash
  2. #
  3. # ownCloud
  4. #
  5. # Run JS tests
  6. #
  7. # @author Vincent Petry
  8. # @copyright 2014 Vincent Petry <pvince81@owncloud.com>
  9. #
  10. set -euo pipefail
  11. # create scss test
  12. # We use the deprecated node-sass module for that as the compilation fails with modern modules. See "DEPRECATION WARNING" during execution of this script.
  13. mkdir -p tests/css
  14. for SCSSFILE in core/css/*.scss
  15. do
  16. FILE=$(basename $SCSSFILE)
  17. printf "\$webroot:''; @import 'functions.scss'; @import 'variables.scss'; @import '${FILE}';" | ./node_modules/.bin/node-sass --include-path core/css/ > tests/css/${FILE}.css
  18. done
  19. npm run test:jsunit