Sha256: 14e44507f38d526eca1f60b250d125cefe8dde6418a3f0f6b57c873c4a7fcb96

Contents?: true

Size: 840 Bytes

Versions: 4

Compression:

Stored size: 840 Bytes

Contents

namespace :cy do
  desc "Open Cypress test runner"
  task :open do
    system "npm run cypress open"
  end

  desc "Run Cypress tests headless"
  task :run do
    system "npm run cypress run"
  end

  desc "Start server and open Cypress test runner"
  task :test do
    ENV["BRIDGETOWN_ENV"] = "test"
    server_pid = fork { Bridgetown::Commands::Start.start }
    Rake::Task["cy:open"].execute
    Process.kill "SIGTERM", server_pid
    sleep 1 # give processes time to clean up
    puts
  end

  namespace :test do
    desc "Start server and run Cypress tests headless"
    task :ci do
      ENV["BRIDGETOWN_ENV"] = "test"
      server_pid = fork { Bridgetown::Commands::Start.start }
      Rake::Task["cy:run"].execute
      Process.kill "SIGTERM", server_pid
      sleep 1 # give processes time to clean up
      puts
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bridgetown-core-2.0.0.beta4 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-2.0.0.beta3 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-2.0.0.beta2 lib/bridgetown-core/configurations/cypress/cypress_tasks
bridgetown-core-2.0.0.beta1 lib/bridgetown-core/configurations/cypress/cypress_tasks