aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert2017-10-17 12:18:07 +0200
committerRobert2017-10-17 12:18:07 +0200
commitf6bfa739829863a0f9b784fd51a0aa9e25091e6a (patch)
tree26033b3edaadc0739c036df59c1045c7b4947b59
parent38de9145c750b52297abbffa1f31f1829a1c6b43 (diff)
parent58cfec64c621d1c6893280f5ad8793af81573199 (diff)
downloadchouette-core-f6bfa739829863a0f9b784fd51a0aa9e25091e6a.tar.bz2
Merge branch 'master' of github.com:af83/stif-boiv
-rw-r--r--config/webpack/test.js5
-rw-r--r--lib/tasks/ci.rake13
-rw-r--r--package.json2
-rw-r--r--spec/javascript/spec_helper.js4
4 files changed, 15 insertions, 9 deletions
diff --git a/config/webpack/test.js b/config/webpack/test.js
index d728f40d2..81269f651 100644
--- a/config/webpack/test.js
+++ b/config/webpack/test.js
@@ -1,8 +1,3 @@
const environment = require('./environment')
-import $ from 'jquery';
-global.$ = global.jQuery = $;
-
-require('bootstrap')
-
module.exports = environment.toWebpackConfig()
diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake
index ace042546..3e73b7a3b 100644
--- a/lib/tasks/ci.rake
+++ b/lib/tasks/ci.rake
@@ -31,8 +31,14 @@ namespace :ci do
sh "bundle exec bundle-audit check --update"
end
- task :spec do
- sh "bundle exec rake spec"
+ task :spec => ["ci:assets","spec"]
+
+ task :assets do
+ sh "RAILS_ENV=test bundle exec rake assets:precompile"
+ end
+
+ task :jest => "ci:assets" do
+ sh "node_modules/.bin/jest"
end
desc "Deploy after CI"
@@ -47,8 +53,9 @@ namespace :ci do
desc "Clean test files"
task :clean do
sh "rm -rf log/test.log"
+ sh "RAILS_ENV=test bundle exec rake assets:clobber"
end
end
desc "Run continuous integration tasks (spec, ...)"
-task :ci => ["ci:setup", "ci:spec", "cucumber", "ci:check_security", "ci:deploy", "ci:clean"]
+task :ci => ["ci:setup", "ci:spec", "ci:jest", "cucumber", "ci:check_security", "ci:deploy", "ci:clean"]
diff --git a/package.json b/package.json
index 010f2b606..7e8d695ac 100644
--- a/package.json
+++ b/package.json
@@ -41,7 +41,7 @@
"<rootDir>/spec/javascript"
],
"setupFiles": [
- "<rootDir>/config/webpack/test.js"
+ "<rootDir>/spec/javascript/spec_helper.js"
]
}
}
diff --git a/spec/javascript/spec_helper.js b/spec/javascript/spec_helper.js
new file mode 100644
index 000000000..135995eb2
--- /dev/null
+++ b/spec/javascript/spec_helper.js
@@ -0,0 +1,4 @@
+import $ from 'jquery';
+global.$ = global.jQuery = $;
+
+require('bootstrap') \ No newline at end of file