Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
feat(ngHintModules): install ngHintModules module
Browse files Browse the repository at this point in the history
  • Loading branch information
Erin Altenhof-Long committed Jul 30, 2014
1 parent f957b46 commit a59ff7f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 4 additions & 2 deletions hint.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ require('angular-hint-directives');
require('angular-hint-dom');
require('angular-hint-events');
require('angular-hint-interpolation');
require('angular-hint-modules');

// List of all possible modules
// The default ng-hint behavior loads all modules
var allModules = ['ngHintControllers', 'ngHintDirectives', 'ngHintDom', 'ngHintEvents',
'ngHintInterpolation'];
'ngHintInterpolation', 'ngHintModules'];

// Determine whether this run is by protractor.
// If protractor is running, the bootstrap will already be deferred.
Expand Down Expand Up @@ -57,7 +58,8 @@ function loadModules() {
} else if (document.querySelector('[ng-hint]')) {
modules = allModules;
} else {
angular.hint.logMessage('##General## ngHint is included on the page, but is not active because there is no `ng-hint` attribute present');
angular.hint.logMessage('##General## ngHint is included on the page, but is not active because'+
' there is no `ng-hint` attribute present');
}
return modules;
}
Expand Down
7 changes: 5 additions & 2 deletions hint_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('angularHint', function() {
.toBe('Angular Hint: General Module ngHintWrongModuleName could not be found');
browser.get('excludeWrongModuleName/');
expect(element(by.id('console')).getText())
.toBe('Angular Hint: General Module ngHintExcludeWrongModuleName could not be found');
.toContain('Angular Hint: General Module ngHintExcludeWrongModuleName could not be found');
});


Expand All @@ -30,7 +30,10 @@ describe('angularHint', function() {
'in [object Object] scope');
//angular-hint-interpolation
expect(element(by.id('console')).getText()).toContain('was found to be undefined in');
// expect(element(by.id('console')).getText()).toContain('Module "sample" was created but never loaded');
//angular-hint-modules
expect(element(by.id('console')).getText()).toContain('Module "sampleAllHint" was created ' +
'but never loaded. Multiple modules with name "sampleAllHint" are being created and they' +
' will overwrite each other.');
});


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"angular-hint-events": "^0.2.0",
"angular-hint-interpolation": "^0.2.0",
"angular-hint-log": "0.2.0",
"angular-hint-modules": "0.1.0"
"angular-hint-modules": "0.2.0"
},
"devDependencies": {
"browserify": "^4.2.0",
Expand Down

0 comments on commit a59ff7f

Please sign in to comment.