Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
add a basic smoke test to catch errors high up
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerball committed Apr 22, 2019
1 parent c5d621b commit 93efb36
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/shopify-cli/command_registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def resolve_command(name)
end

def resolve_prerequisite(name)
@task_registry[name].call(@ctx)
@task_registry[name]&.call(@ctx)
end
end
end
11 changes: 11 additions & 0 deletions test/shopify-cli/smoke_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require 'test_helper'

module Shopifyli
class SmokeTest < MiniTest::Test
def test_exit_non_zero
capture_io do
assert_nil ShopifyCli::EntryPoint.call(['help'])
end
end
end
end

0 comments on commit 93efb36

Please sign in to comment.