mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Run karma task only in test environment
and fails otherwise, as it needs the defaults defined in test environment
This commit is contained in:
@@ -14,4 +14,4 @@ echo "--- Bundling"
|
||||
bundle install
|
||||
|
||||
echo "--- Running tests"
|
||||
bundle exec rake karma:run
|
||||
./script/karma run
|
||||
|
||||
13
script/karma
Executable file
13
script/karma
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
task="$1"
|
||||
|
||||
if [ "$task" = "run" ] || [ "$task" = "start" ]; then
|
||||
exec bundle exec rake "karma:$task" RAILS_ENV=test
|
||||
else
|
||||
echo "Usage:"
|
||||
echo " $0 run # to run the tests once"
|
||||
echo " $0 start # to run the tests on every file modification"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user