Skip to content

Commit

Permalink
Run react tests in rake's default task
Browse files Browse the repository at this point in the history
- Add `js:spec` task to wrap `npm run build && npm run test`
- Add `builder:audit` task to the `default` task from the get go.
  • Loading branch information
teoljungberg committed Jan 12, 2017
1 parent 32336a2 commit 0838743
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 1 addition & 3 deletions Rakefile
Expand Up @@ -8,7 +8,7 @@ Houndapp::Application.load_tasks
task(:default).clear

# Run webpack:build before :spec
task default: ["webpack:build", :spec]
task default: ["webpack:build", "spec", "js:spec", "bundler:audit"]

task "assets:precompile" => "webpack:build"

Expand All @@ -18,5 +18,3 @@ if defined? RSpec
t.verbose = false
end
end

task default: "bundler:audit"
2 changes: 1 addition & 1 deletion circle.yml
Expand Up @@ -4,4 +4,4 @@ machine:

test:
override:
- bundle exec rake && npm run test
- bundle exec rake
5 changes: 5 additions & 0 deletions lib/tasks/js.rake
@@ -0,0 +1,5 @@
namespace :js do
task spec: "webpack:build" do
sh "npm run test"
end
end

0 comments on commit 0838743

Please sign in to comment.