Skip to content

Instantly share code, notes, and snippets.

@rija
Last active December 15, 2019 05:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rija/a6f589e102d72ecb8d180153ab14a96d to your computer and use it in GitHub Desktop.
Save rija/a6f589e102d72ecb8d180153ab14a96d to your computer and use it in GitHub Desktop.
scratch notes for setting karma and jasmine for testing vuejs app running in html page (no SFC, no Node, no pipeline)
$ pwd
/Users/rija/Documents/projects/vuejs-karma-jasmine-web
$ tree .
.
├── src
│   ├── css
│   ├── html
│   │   └── index.html
│   └── js
│       └── script.js
└── tests
    └── js
# Install Karma:
$ npm install karma --save-dev

# Install plugins that your project needs:
$ npm install karma-jasmine karma-chrome-launcher karma-phantomjs-launcher karma-env-preprocessor karma-firefox-launcher jasmine-core --save-dev

# cli tools
$ npm install -g karma-cli

in package.json:

"jasmine-core": "^3.5.0",
"karma": "^4.4.1",
"karma-chrome-launcher": "^3.1.0",
"karma-env-preprocessor": "^0.1.1",
"karma-firefox-launcher": "^1.2.0",
"karma-jasmine": "^2.0.1",
"karma-phantomjs-launcher": "^1.0.4",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment