Last active
May 20, 2017 12:46
-
-
Save SunKing2/8a2bcbc12713ae7de77fcd037ded9be2 to your computer and use it in GitHub Desktop.
setup karma as continuous runner of jasmine ubuntu 17.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install -y curl | |
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - | |
sudo apt-get update | |
sudo apt-get install -y nodejs | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo apt-get update && sudo apt-get install -y yarn | |
yarn init -y | |
yarn add karma karma-jasmine karma-chrome-launcher jasmine-core | |
sudo yarn global add karma-cli | |
echo 'export CHROME_BIN="/usr/bin/chromium-browser"' >> ~/.bashrc | |
source ~/.bashrc | |
cat > input.txt<<EOF | |
test.js | |
EOF | |
karma init < input.txt | |
cat > test.js <<EOF | |
describe("A suite is just a function", function() { | |
var a; | |
it("and so is a spec", function() { | |
a = true; | |
expect(a).toBe(true); | |
}); | |
}); | |
EOF | |
karma start | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment