Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent loading angular multiple times with webpack #127

Merged
merged 3 commits into from
Jan 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you need to add browserify?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found out why you needed to add this dependency.

"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",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as browserify dependency

"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