Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hypertest

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hypertest

  • 0.1.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Hypertest

Hypertest is a very simple tool to help you run fast test suites in a very tight dev loop on file changes.

Installation

Add gem 'hypertest' to your Gemfile, maybe in a :development, :test group, then bundle install. gem 'bootsnap' is also recommended.

Generally you will want to use Hypertest by creating a file like:

#!/usr/bin/env ruby
# bin/hypertest

require 'bundler/setup'
Bundler.require(:development, :test)

ROOT = File.expand_path('..', __dir__)
$LOAD_PATH.unshift(File.join(ROOT, 'lib'))
$LOAD_PATH.unshift(File.join(ROOT, 'test'))

# Bootsnap isn't necessary but generally speeds things up even further.
Bootsnap.setup(
  cache_dir:          "#{ROOT}/tmp/cache",
  ignore_directories: [],
  development_mode:   true,
  load_path_cache:    true,
  compile_cache_iseq: true,
  compile_cache_yaml: true,
  compile_cache_json: true,
  readonly:           false,
)

Hypertest.run do
  require 'test_helper'
  Dir.glob('test/**/*_test.rb').each do |file|
    require File.join(ROOT, file)
  end
end

This loads ruby and your bundle, then forks to load your test helper and tests after each file change. Happy hacking!

Limitations

  • Only works on macOS because I've only implemented this with FSEvents. Patches welcome.
  • Path filtering (ignore:) can only match on directory paths because the FSEvents library doesn't seem to want to let me use file_events: true.

FAQs

Package last updated on 28 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc