April 19, 2019
April 25, 2018
How to update password in GIT using command line
As we know, using GIT through command line is one of the best way to handle repos. However, sometimes we faces issues when we update GIT password and command line does not take the updated password automatically.
For Mac
Once execute above commands, run command that you want to execute, it will prompt for username and password again.
Hope it helps, let me know in case it does not work.
To fix this issue, we can use the below commands:
For windows:
git config --global credential.helper wincred
For Mac
git config --global credential.helper osckeychain
Once execute above commands, run command that you want to execute, it will prompt for username and password again.
Hope it helps, let me know in case it does not work.
March 25, 2018
How to config gulp to run unit test cases using Istanbul with code coverage
Add below configuration in gulpfile.js for running Istanbul with mocha unit test cases through gulp.
For code coverage, we can use istanbul.writeReports method as shown above.
Once executing the command gulp test, it will execute all the test cases along with coverage report generated at given location.
const gulp = require('gulp');
const istanbul = require('gulp-istanbul');
const mocha = require('gulp-mocha');
gulp.task('test', () => {
gulp.src(['src/**/*.js'])
.pipe(istanbul())
.pipe(istanbul.hookRequire())
.on('finish', () => {
gulp.src(['test/unit/**/*.spec.js'])
.pipe(mocha())
.pipe(istanbul.writeReports({
dir: './test/unit-test-coverage',
reporters: ['lcov', 'clover', 'text', 'text-summary'],
reportOpts: {
dir: './test/unit-test-coverage',
},
}));
});
});
For code coverage, we can use istanbul.writeReports method as shown above.
Once executing the command gulp test, it will execute all the test cases along with coverage report generated at given location.
Subscribe to:
Posts (Atom)