#!/bin/bash

echo "Running ESLint & Karma"

npm run lint
lint=$?
if [ $lint -ne 0 ]; then
    echo "ESLint Failed. Please fix the errors and push again."
  exit 1
fi

npm run karma:hook
karma=$?
if [ $karma -ne 0 ]; then
    echo "Karma Failed. Please fix the failing unit tests and push again."
  exit 1
fi
