class Hippo::Command::Jest

Attributes

config[R]

Public Instance Methods

config_file() click to toggle source
# File lib/hippo/command/jest.rb, line 26
def config_file
    config.directory.join('jest.config.json')
end
configure() click to toggle source
# File lib/hippo/command/jest.rb, line 19
def configure
    @extension ||= Command.load_current_extension(raise_on_fail:true)
    @config = Hippo::Webpack::ClientConfig.new
    @config.invoke_all
    self
end
start() click to toggle source
# File lib/hippo/command/jest.rb, line 30
def start
    say 'Starting Jest', :green
    say Dir.pwd, :yellow
    cmd = "$(npm bin)/jest --config #{config_file}"
    options.each do |key, value|
        cmd << " --#{key}" if value
    end
    say cmd, :green
    exec(cmd)
end