This project sets up for JavaScript testing frameworks.
- Mocha a unit test framework.
- Jasmine a behaviour-driven development framework.
- Karma allows you to execute JavaScript code in multiple real browsers.
- Protractor an E2E test framework for Angular.
npm install --save express
npm install --save request
npm install -g mocha
npm install --save-dev mocha
npm install --save-dev chai
npm install --save-dev sinon
npm install -g gulp
npm install --save gulp gulp-mocha gulp-util
npm install -g grunt-cli
npm install --save grunt grunt-mocha-test grunt-contrib-watch
npm install -g jasmine
npm install --save-dev jasmine -core
jasmine init
npm install -g karma
npm install -g karma-cli
npm install --save-dev karma
npm install --save-dev karma-jasmine karma-chrome-launcher karma-ie-launcher
npm install --save-dev karma-browserify browserify watchify
karma init
./node_modules/karma/bin/karma start
install java
npm install -g protractor
webdriver-manager update
webdriver-manager update --ie
set CHROME_BIN=C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
set IE_BIN=C:\Program Files\Internet Explorer\iexplore.exe
mocha mocha_testing
mocha "mocha_testing/addTesting.js"
jasmine
gulp
grunt
karma start
start WebDriver
webdriver-manager start
protractor conf.js
Files/Folders | Description |
---|---|
gruntfile.js | grunt file for run mocha testing |
gulpfile.js | gulp file for run mocha testing |
-karma_testing | Karma test runner |
-mocha_testing | Mocha framework, using Chai as assertion library and Simon as mocking library |
-protractor | Protractor for end to end testing |
-spec | Jasmine framework |
-src | source code to be tested |