class Guard::Jest::Runner

Attributes

last_failed_paths[RW]
last_result[RW]
options[R]
server[R]

Public Class Methods

new(options) click to toggle source
# File lib/guard/jest/runner.rb, line 12
def initialize(options)
    reload(options)
end

Public Instance Methods

reload(options) click to toggle source
# File lib/guard/jest/runner.rb, line 16
def reload(options)
    @options = options
    @server = options[:server]
    self.last_failed_paths = []
end
remove_paths(paths) click to toggle source
# File lib/guard/jest/runner.rb, line 31
def remove_paths(paths)
    self.last_failed_paths -= paths
end
test_all() click to toggle source
# File lib/guard/jest/runner.rb, line 22
def test_all
    server.run(RunRequest.new(:all))
end
test_paths(paths) click to toggle source
# File lib/guard/jest/runner.rb, line 26
def test_paths(paths)
    paths = paths.concat(last_failed_paths) if options[:keep_failed]
    server.run(RunRequest.new(paths.uniq.compact))
end