You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.warn('githook-scripts: no githook scripts found, add one (ex: "githook:pre-commit") to package.json and run "npm rebuild githook-scripts" to activate');
console.warn('githook-scripts: "'+hookName+'" is not a valid git hook, ignoring');
98
+
returnfalse;
99
+
});
100
+
101
+
if(validGithookNames.length<=0){
102
+
console.warn('githook-scripts: no valid githook scripts found, add one (ex: "githook:pre-commit") to package.json and run "npm rebuild githook-scripts" to activate');
103
+
console.warn('githook-scripts: valid githooks are '+VALID_HOOK_NAMES.join(', '));
it('should warn if a package.json does not have a scripts field',function(){
17
+
varlogLines=utils.setup(undefined);
18
+
expect(logLines).to.have.length(1);
19
+
expect(logLines[0]).to.equal('githook-scripts: no "scripts" field in package.json, skipping');
20
+
});
21
+
22
+
it('should warn if a package.json does not have any scripts defined',function(){
23
+
varlogLines=utils.setup({});
24
+
expect(logLines).to.have.length(1);
25
+
expect(logLines[0]).to.equal('githook-scripts: no githook scripts found, add one (ex: "githook:pre-commit") to package.json and run "npm rebuild githook-scripts" to activate');
expect(logLines[1]).to.equal('githook-scripts: no valid githook scripts found, add one (ex: "githook:pre-commit") to package.json and run "npm rebuild githook-scripts" to activate');
it('should warn if a package.json does not have any githook scripts defined',function(){
23
+
varlogLines=utils.setup({test: 'jest'});
24
+
expect(logLines).to.have.length(1);
25
+
expect(logLines[0]).to.equal('githook-scripts: no githook scripts found, add one (ex: "githook:pre-commit") to package.json and run "npm rebuild githook-scripts" to activate');
0 commit comments