Skip to content

Commit

Permalink
Merge pull request #127 from erhardos/master
Browse files Browse the repository at this point in the history
Prevent loading angular multiple times with webpack
  • Loading branch information
pgom authored Jan 24, 2018
2 parents e90bd56 + eda48bd commit f3904d2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@
"url": "https://github.com/seegno/angular-oauth2/issues"
},
"homepage": "https://github.com/seegno/angular-oauth2",
"dependencies": {
"angular": "1.5.9",
"angular-cookies": "1.5.9",
"query-string": "^1.0.0"
},
"dependencies": {},
"devDependencies": {
"angular": "^1.5.9",
"angular-cookies": "^1.5.9",
"angular-mocks": "1.5.9",
"browserify": "^14.5.0",
"github-changes": "^1.0.0",
"gulp": "^3.8.10",
"gulp-babel": "^5.3.0",
Expand All @@ -39,7 +38,7 @@
"gulp-wrap-umd": "^0.2.1",
"jshint-stylish": "^1.0.0",
"karma": "^0.13.0",
"karma-browserify": "^2.0.0",
"karma-browserify": "^5.1.2",
"karma-chrome-launcher": "^0.1.7",
"karma-firefox-launcher": "^0.1.4",
"karma-mocha": "^0.1.10",
Expand All @@ -48,8 +47,10 @@
"karma-sinon": "^1.0.4",
"lodash": "^4.0.0",
"mocha": "^2.4.5",
"query-string": "^1.0.0",
"should": "^4.6.0",
"sinon": "^1.17.3",
"watchify": "^3.9.0",
"yargs": "^3.6.0"
},
"scripts": {
Expand Down
18 changes: 12 additions & 6 deletions test/unit/interceptors/oauth-interceptor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ describe('oauthInterceptor', function() {

$httpBackend.expectGET('https://website.com').respond(400, { error: 'invalid_request' });

$http.get('https://website.com');
$http.get('https://website.com')
.catch(() => { });

$httpBackend.flush();

Expand All @@ -77,7 +78,8 @@ describe('oauthInterceptor', function() {

$httpBackend.expectGET('https://website.com').respond(400, { error: 'invalid_request' });

$http.get('https://website.com');
$http.get('https://website.com')
.catch(() => { });

$httpBackend.flush();

Expand All @@ -93,7 +95,8 @@ describe('oauthInterceptor', function() {

$httpBackend.expectGET('https://website.com').respond(400, { error: 'invalid_grant' });

$http.get('https://website.com');
$http.get('https://website.com')
.catch(() => { });

$httpBackend.flush();

Expand All @@ -106,7 +109,8 @@ describe('oauthInterceptor', function() {

$httpBackend.expectGET('https://website.com').respond(400, { error: 'invalid_grant' });

$http.get('https://website.com');
$http.get('https://website.com')
.catch(() => { });

$httpBackend.flush();

Expand All @@ -122,7 +126,8 @@ describe('oauthInterceptor', function() {

$httpBackend.expectGET('https://website.com').respond(401, { error: 'invalid_token' });

$http.get('https://website.com');
$http.get('https://website.com')
.catch(() => { });

$httpBackend.flush();

Expand All @@ -138,7 +143,8 @@ describe('oauthInterceptor', function() {

$httpBackend.expectGET('https://website.com').respond(401, null, { 'www-authenticate': 'Bearer realm="example"' });

$http.get('https://website.com');
$http.get('https://website.com')
.catch(() => { });

$httpBackend.flush();

Expand Down

0 comments on commit f3904d2

Please sign in to comment.