Skip to content

Commit

Permalink
Removed supertest-as-promised: Supertest 3.0.0 already returns a prom…
Browse files Browse the repository at this point in the history
…ise (#123)
  • Loading branch information
Lobosque authored and diegohaz committed Nov 7, 2017
1 parent 400559f commit f266fbd
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 45 deletions.
2 changes: 1 addition & 1 deletion generators/api/templates/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var hasAnotherSession = storeUser &&
(userMethods.indexOf('PUT') >= 0 || userMethods.indexOf('DELETE') >= 0);
_%>
<%_ if (methods.length) { _%>
import request from 'supertest-as-promised'
import request from 'supertest'
<%_ } _%>
<%_ if (hasMaster) { _%>
import { masterKey, apiRoot } from '../../config'
Expand Down
3 changes: 1 addition & 2 deletions generators/app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
"nodemon": "^1.10.2",
"opn-cli": "^3.1.0",
"sinon": "^4.0.1",
"supertest": "^3.0.0",
"supertest-as-promised": "^4.0.0"
"supertest": "^3.0.0"
},
"dependencies": {
"babel-core": "^6.26.0",
Expand Down
2 changes: 1 addition & 1 deletion generators/app/templates/api/auth/index.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%_ if (authServices.length) { _%>
import { stub } from 'sinon'
<%_ } _%>
import request from 'supertest-as-promised'
import request from 'supertest'
<%_ if (passwordSignup) { _%>
import { masterKey, apiRoot } from '../../config'
import { User } from '../user'
Expand Down
2 changes: 1 addition & 1 deletion generators/app/templates/api/password-reset/index.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import request from 'supertest-as-promised'
import request from 'supertest'
import nock from 'nock'
import express from '../../services/express'
import { masterKey, apiRoot } from '../../config'
Expand Down
2 changes: 1 addition & 1 deletion generators/app/templates/api/user/index.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import request from 'supertest-as-promised'
import request from 'supertest'
import { masterKey, apiRoot } from '../../config'
import { signSync } from '../../services/jwt'
import express from '../../services/express'
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@
"request-promise": "^4.1.1",
"sendgrid": "^4.0.2",
"sinon": "^1.17.5",
"supertest": "^2.0.0",
"supertest-as-promised": "^4.0.0",
"supertest": "^3.0.0",
"yeoman-assert": "^2.0.0",
"yeoman-test": "^1.0.0"
},
Expand Down
89 changes: 52 additions & 37 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ [email protected]:
version "2.10.2"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.10.2.tgz#024a5517295308857f14f91f1106fc3b555f446b"

bluebird@^3.3.1, bluebird@^3.4.1, bluebird@^3.4.6:
bluebird@^3.4.1, bluebird@^3.4.6:
version "3.4.7"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3"

Expand Down Expand Up @@ -1357,9 +1357,9 @@ [email protected]:
version "0.3.1"
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb"

cookiejar@^2.0.6:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.0.tgz#86549689539b6d0e269b6637a304be508194d898"
cookiejar@^2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.1.tgz#41ad57b1b555951ec171412a81942b1e8200d34a"

core-js@^2.4.0:
version "2.4.1"
Expand Down Expand Up @@ -1474,6 +1474,12 @@ [email protected], debug@~2.2.0:
dependencies:
ms "0.7.1"

debug@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
dependencies:
ms "2.0.0"

decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
Expand Down Expand Up @@ -2307,13 +2313,13 @@ forever-agent@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"

form-data@1.0.0-rc4:
version "1.0.0-rc4"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-1.0.0-rc4.tgz#05ac6bc22227b43e4461f488161554699d4f8b5e"
form-data@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.1.tgz#6fb94fbd71885306d73d15cc497fe4cc4ecd44bf"
dependencies:
async "^1.5.2"
asynckit "^0.4.0"
combined-stream "^1.0.5"
mime-types "^2.1.10"
mime-types "^2.1.12"

form-data@~2.0.0:
version "2.0.0"
Expand All @@ -2337,9 +2343,9 @@ [email protected]:
dependencies:
samsam "~1.1"

formidable@^1.0.17:
version "1.0.17"
resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.0.17.tgz#ef5491490f9433b705faa77249c99029ae348559"
formidable@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.1.1.tgz#96b8886f7c3c3508b932d6bd70c4d3a88f35f1a9"

forwarded@~0.1.0:
version "0.1.0"
Expand Down Expand Up @@ -4171,7 +4177,7 @@ merge@^1.1.3:
version "1.2.0"
resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da"

methods@1.x, methods@^1.1.1, methods@~1.1.2:
methods@^1.1.1, methods@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"

Expand All @@ -4197,16 +4203,20 @@ micromatch@^2.1.5, micromatch@^2.3.11, micromatch@^2.3.7:
version "1.25.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.25.0.tgz#c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392"

mime-types@^2.1.10, mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.13, mime-types@~2.1.7:
mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.13, mime-types@~2.1.7:
version "2.1.13"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.13.tgz#e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88"
dependencies:
mime-db "~1.25.0"

[email protected], mime@^1.3.4:
[email protected]:
version "1.3.4"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53"

mime@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"

[email protected]:
version "0.3.0"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.3.0.tgz#275d8edaac4f1bb3326472089e7949c8394699dd"
Expand Down Expand Up @@ -4376,6 +4386,10 @@ [email protected], ms@^0.7.1:
version "0.7.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765"

[email protected]:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"

multimatch@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b"
Expand Down Expand Up @@ -4933,7 +4947,11 @@ [email protected], qs@^6.0.2, qs@~6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.0.tgz#3b7848c03c2dece69a9522b0fae8c4126d745f3b"

qs@^6.1.0, qs@~6.3.0:
qs@^6.5.1:
version "6.5.1"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8"

qs@~6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442"

Expand Down Expand Up @@ -5262,6 +5280,10 @@ require_optional@~1.0.0:
resolve-from "^2.0.0"
semver "^5.1.0"

reserved-words@^0.1.1:
version "0.1.2"
resolved "https://registry.yarnpkg.com/reserved-words/-/reserved-words-0.1.2.tgz#00a0940f98cd501aeaaac316411d9adc52b31ab1"

resolve-dir@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-0.1.1.tgz#b219259a5602fac5c5c496ad894a6e8cc430261e"
Expand Down Expand Up @@ -5717,34 +5739,27 @@ sum-up@^1.0.1:
dependencies:
chalk "^1.0.0"

superagent@^2.0.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/superagent/-/superagent-2.3.0.tgz#703529a0714e57e123959ddefbce193b2e50d115"
superagent@^3.0.0:
version "3.8.0"
resolved "https://registry.yarnpkg.com/superagent/-/superagent-3.8.0.tgz#87e3ed536c8860c08c7c7d1225da9a80cab064c6"
dependencies:
component-emitter "^1.2.0"
cookiejar "^2.0.6"
debug "^2.2.0"
cookiejar "^2.1.0"
debug "^3.1.0"
extend "^3.0.0"
form-data "1.0.0-rc4"
formidable "^1.0.17"
form-data "^2.3.1"
formidable "^1.1.1"
methods "^1.1.1"
mime "^1.3.4"
qs "^6.1.0"
mime "^1.4.1"
qs "^6.5.1"
readable-stream "^2.0.5"

supertest-as-promised@^4.0.0:
version "4.0.2"
resolved "https://registry.yarnpkg.com/supertest-as-promised/-/supertest-as-promised-4.0.2.tgz#0464f2bd256568d4a59bce84269c0548f6879f1a"
dependencies:
bluebird "^3.3.1"
methods "^1.1.1"

supertest@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/supertest/-/supertest-2.0.1.tgz#a058081d788f1515d4700d7502881e6b759e44cd"
supertest@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/supertest/-/supertest-3.0.0.tgz#8d4bb68fd1830ee07033b1c5a5a9a4021c965296"
dependencies:
methods "1.x"
superagent "^2.0.0"
methods "~1.1.2"
superagent "^3.0.0"

[email protected]:
version "1.2.0"
Expand Down

0 comments on commit f266fbd

Please sign in to comment.