added tests for node

This commit is contained in:
Ken Struys 2014-03-14 11:25:23 -07:00
parent dd004c2ee5
commit 1a9ace859a
3 changed files with 67 additions and 2 deletions

View file

@ -43,7 +43,7 @@ def test_install_python_repo_in_env(python_pre_commit_git_repo, config_for_pytho
@pytest.mark.integration
def test_run_a_hook_omg(config_for_python_pre_commit_git_repo):
def test_run_a_python_hook(config_for_python_pre_commit_git_repo):
repo = Repository(config_for_python_pre_commit_git_repo)
repo.install()
ret = repo.run_hook('foo', [])
@ -52,6 +52,15 @@ def test_run_a_hook_omg(config_for_python_pre_commit_git_repo):
assert ret[1] == 'Hello World\n'
@pytest.mark.skipif(True, reason="TODO: make this test not super slow")
def test_run_a_node_hook(config_for_node_pre_commit_git_repo):
repo = Repository(config_for_node_pre_commit_git_repo)
repo.install()
ret = repo.run_hook('foo', [])
assert ret[0] == 0
assert ret[1] == 'Hello World\n'
@pytest.fixture
def mock_repo_config():
config = {
@ -83,3 +92,5 @@ def test_languages(config_for_python_pre_commit_git_repo):
repo = Repository(config_for_python_pre_commit_git_repo)
assert repo.languages == set(['python'])