Skip to content

Commit

Permalink
Update jasmine rake task and gh action
Browse files Browse the repository at this point in the history
We don't get a jasmine rake task so need
to create one in the Rakefile.

jasmine-browser-runner also expects chrome to be
installed so this adds an action to set it up. The
'setup-chrome' action defaults to using the latest
version so it doesn't need to be specified.

We use chrome and not chromedriver, to match the
expected use for jasmine-browser-runner:

https://github.com/jasmine/jasmine-browser-runner/blob/main/release_notes/2.3.0.md
  • Loading branch information
tombye committed Jan 15, 2025
1 parent ab92c8d commit a963cd0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@ require "jasmine"

RSpec::Core::RakeTask.new(:spec)

load "jasmine/tasks/jasmine.rake"
namespace :jasmine do
desc "Test JavaScript with headless browser"
task :ci do
sh "npm test"
end
desc "Test JavaScript in browser"
task :server do
sh "npm run test-server"
end
end

desc "Lint Ruby and JavaScript"
task :lint do
Expand Down

0 comments on commit a963cd0

Please sign in to comment.