Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/nock/nock

HTTP server mocking and expectations library for Node.js
https://github.com/nock/nock

refactor: chai assertions in test_recorder (#1775)

5ea853f6df6e392a734be3fd26412192d35daf4d authored about 5 years ago by Paul Melnikow <[email protected]>
refactor: Mocha DSL for test_reply_* (#1773)

This adds a fair amount of nesting to these tests. Nesting is a mixed bag. It makes the tests a ...

479aa5bacbb1bc6ea12ae7606dd5c68008f59af1 authored about 5 years ago by Paul Melnikow <[email protected]>
refactor: Convert a few files to the Mocha DSL (#1772)

This adds a few `describe()` blocks. I didn't put everything into `describe()`s, only the tests ...

bec8319e3e3c1596402d2125909b294b99f6c533 authored about 5 years ago by Paul Melnikow <[email protected]>
refactor: chai assertions in test_reply_* (#1771)

5acc974752f5f66274966238555cb7cfbab6248b authored about 5 years ago by Paul Melnikow <[email protected]>
refactor: chai assertions and related refactors in test_scope (#1767)

55856abe8da28d2d3c533262f2bd2f0d911d0788 authored about 5 years ago by Paul Melnikow <[email protected]>
refactor: chai assertions in test_socketdelay (#1766)

f5b2c92762d2231024ff1b5db35bb55ad9199cf5 authored about 5 years ago by Paul Melnikow <[email protected]>
refactor: chai assertions and minor refactors in test_stream (#1765)

155666a0486079db8d791a16e2d8b0938f0d0363 authored about 5 years ago by Paul Melnikow <[email protected]>
refactor: Mocha-like DSL for abort tests (#1769)

Thanks to a convenient feature of Tap, we can start updating tests to
use Mocha's DSL while sti...

295d0de90be1a2f2568eac8fe31f03d5b322b7b4 authored about 5 years ago by Matt R. Wilson <[email protected]>
refactor: chai assertions for abort tests (#1762)

For: #1305

d030b4fb99648cdc447291a1990590c1978208aa authored about 5 years ago by Matt R. Wilson <[email protected]>
refactor: chai assertions for test_url_encoding (#1764)

Ref https://github.com/nock/nock/issues/1305#issuecomment-544878116

70a530c11d23a0924eb27bb92827fc2dc53d955c authored about 5 years ago by Paul Melnikow <[email protected]>
refactor: Correct the inverted logic of isUtf8Representable (#1752)

In 9da400f98aa2d7fe06e813b01403877fed4f2065 – which isn’t linked to the PR for some reason –`isB...

628ae3314bcb3b333bcef34cd30de848c7d02759 authored about 5 years ago by Paul Melnikow <[email protected]>
feature(socket): add missing Socket attributes (#1761)

fixes: #1643

https://nodejs.org/docs/latest-v10.x/api/net.html#net_class_net_socket

8f0f31d4ef6b0a4f020a679d012e2771a203fe60 authored about 5 years ago by Matt R. Wilson <[email protected]>
feat: Add lifecycle function to clear pending timeouts (#1748)

Closes #1118

187db85af7a8b0d2405bbfd77f2aa7c2d2b88854 authored about 5 years ago by TLPcoder <[email protected]>
feat: Throw errors for URL paths without leading slashes, which will never match (#1744)

Fix #1730

b7f9f131ff437dfd192a422003db81087295312d authored about 5 years ago by TLPcoder <[email protected]>
refactor: Rewrite a gnarly nested loop (#1755)

This also renames the `scopes` property to `interceptors`, which is more appropriate since it ho...

7a568dda0b79ca62f9b4288676f677e89361f54c authored about 5 years ago by Paul Melnikow <[email protected]>
refactor(test_allow_unmocked_https): Avoid a hardcoded port (#1751)

This test was flaky on my machine.

I’ve also refactored to use async and the tap assertions a...

be011ea4732881d243b3e89d16b077d7eb4ca310 authored about 5 years ago by Paul Melnikow <[email protected]>
refactor(test_allow_unmocked_https): Replace Object.assign with spread (#1750)

2d611dbecd94ef45dbabfdc7da00871dd663641a authored about 5 years ago by Paul Melnikow <[email protected]>
chore: limit published files (#1745)

By default, NPM will pack and publish all files in the directory.
For us, that was 50+ files in...

69976a7e285756313a1a2402cc0e9a2d171900d5 authored about 5 years ago by Matt R. Wilson <[email protected]>
refactor(router): pass socket to response constructor. (#1743)

Passing the socket from the request to the `IncomingMessage` is what
happens in native Node. Us...

d687179471933d847f980756decac02fc70ae676 authored about 5 years ago by Matt R. Wilson <[email protected]>
feat: improve error output by showing which URL caused the error (#1735) (#1740)

After getting an error in the interceptor, mentioning URL's need to start with a slash, it was d...

f4a208ba807aa85dd87d515cda0d19d82efd75a5 authored about 5 years ago by François Martin <[email protected]>
Update lolex to the latest version 🚀 (#1739)

* chore(package): update lolex to version 5.0.0

* chore(package): update lockfile package-loc...

b71bfd0dc7a9e88f6b85a6799eaa0a1a260ff24e authored about 5 years ago by greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
fix: Fix error message (#1736)

Remove repeated "already" in error message.

3f18d7029971224411a2f462c126ddf901a04211 authored about 5 years ago by Luigi Pinca <[email protected]>
docs(README): Replace --save option with --save-dev (#1734)

2d15d05071f8cb4c86298d5c7ed8b01ff535a52c authored about 5 years ago by Max Belsky <[email protected]>
fix(types): data matcher for body and query. (#1725)

* fix(types): data matcher for body and query.

Fixes: #1724
Closes: #1723

Updates the JSO...

59b345c6cb4c3968c7d76b3d38af62e0e8d2a2bc authored over 5 years ago by Matt R. Wilson <[email protected]>
Add TypeScript version to bug template (#1709)

* Add TypeScript version to bug template

* Run prettier

6b88dff97e3fc6e236835982a9d94b3686ae346c authored over 5 years ago by Paul Melnikow <[email protected]>
refactor: Inline setHeader() function (#1722)

Make handling of `Expect: 100-continue` more direct.

ed47e59ef37019fc8983b0ed5491ea36b952cc5c authored over 5 years ago by Paul Melnikow <[email protected]>
refactor: Rename request_overrider -> intercepted_request_router (#1716)

e35b370735f6035fe708b7988b2fb117f9b15203 authored over 5 years ago by Paul Melnikow <[email protected]>
refactor: Avoid unnecessary call to setRequestHeaders after matching (#1719)

Ref #1718 and discussion at https://github.com/nock/nock/pull/1712#discussion_r323528780.

f6e319d0d17422a1d2a3cfe131b0c110c64b8afc authored over 5 years ago by Paul Melnikow <[email protected]>
refactor: Remove unnecessary getHeader() function (#1717)

See discussion at https://github.com/nock/nock/pull/1712#discussion_r323528780

Closes #1502

96a6862770f636ad0d358498c9d96e05bcf05ab5 authored over 5 years ago by Paul Melnikow <[email protected]>
refactor: Split playbackInterceptor into its own module (#1712)

7dca510e27d6b0ddf89dfe74eec0aa93b7f75e82 authored over 5 years ago by Paul Melnikow <[email protected]>
fix: Fix crash when matching certain objects (#1714)

When matching objects with the same number of keys but different keys, should not match instead ...

fa0a08aebe6172ca1cd2c2d69831132feb1a8e09 authored over 5 years ago by Paul Melnikow <[email protected]>
refactor: Separate concerns of interceptor brokering and playback (+ other minor refactors) (#1677)

- Split InterceptedRequestHandler into an InterceptedRequestBroker and a playbackInterceptor fun...

d7b2c928e2cb0cc9e71155cb6d602eb3eac28796 authored over 5 years ago by Paul Melnikow <[email protected]>
refactor: Refactor exports to reduce indirection (#1673)

edce256df58293dbfa02e47f71f3086b15c16078 authored over 5 years ago by Paul Melnikow <[email protected]>
refactor: Refactor recorder stringification (#1678)

c1078175e4478100a83489b46aaaa23629b4a7ae authored over 5 years ago by Paul Melnikow <[email protected]>
docs(README): Add axios example (#1711)

588cd1f9e28715881488642df6dcb72803df6e7d authored over 5 years ago by Alpha <[email protected]>
Update eslint-plugin-node to the latest version 🚀 (#1705)

805df19e85081462d6bce31e1ceb46ee7d137af6 authored over 5 years ago by greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
fix(types): DataMatcher to allow valid JSON scalars. (#1703)

Fixes: #1702

a700fa2c507c2f621f7c0ff685062abe0668d8a6 authored over 5 years ago by Matt R. Wilson <[email protected]>
chore: Check in lockfile

Per @gr2m the issue with Greenkeeper has been resolved and the lockfile can now be checked in. T...

c3c199393701f5648e283ae9c9b5189de964e413 authored over 5 years ago by Paul Melnikow <[email protected]>
test: Add todo test for conflict between hostnames (#1109)

Ref #1108

50c821b036c5b33bf8faf1e13ca9bfb56c8f283b authored over 5 years ago by Cole Turner <[email protected]>
fix: request.end accepted arguments (#1591)

* Fix typo about wrapping request.end.

I'm making this change it's own commit so I have a pla...

9d33bbe3565c5ecd48d9e5b038a282f06b64ecf6 authored over 5 years ago by Matt R. Wilson <[email protected]>
Advertise and enforce 100% coverage, drop Coveralls (#1633)

We've hit 100% coverage!

Coveralls is mostly useful for growing coverage over time. I think t...

29cfce7cfc0c42a5d37267b5776ea9f6d27ec349 authored over 5 years ago by Paul Melnikow <[email protected]>
test: Minor cleanup in test_abort (#1609)

d0f69a417c7f3b8b19ef064f02872e605a58719c authored over 5 years ago by Paul Melnikow <[email protected]>
Async Reply functions (always emit errors) (#1596)

Functions passed to `Interceptor.reply`, either to respond with an array of `[status, body, head...

8a71ea18e8497f99fd15d5f68a700eac5fc296da authored over 5 years ago by Matt R. Wilson <[email protected]>
test(test_intercept): Rewrite more using async, got

e273aa23e784ad9c91d30a7fd1775a4aeff6f2ed authored over 5 years ago by Paul Melnikow <[email protected]>
Remove conditional for now-unsupported Node versions

ccac7c71b7ebb505e49d3bfe88d4159843bba495 authored over 5 years ago by Paul Melnikow <[email protected]>
chore(deps): bump lodash from 4.17.11 to 4.17.13 (#1629)

* chore(deps): bump lodash from 4.17.11 to 4.17.13

Bumps [lodash](https://github.com/lodash/l...

82796677dc9f803a498b1ef75c3ee7a9df37034f authored over 5 years ago by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
fix: alias connection to socket. (#1590)

`ClientRequest.connection` is an alias for `ClientRequest.socket`.
https://nodejs.org/api/http....

397a5274e9d15906ed35cf029c307c05bda4c129 authored over 5 years ago by Matt R. Wilson <[email protected]>
test: fix flappy nock back test (#1595)

- Change fixture filename to be different than the one used in
`test_back_2.js` to avoid race c...

89df7853db49bf10cdf1ce7c6b8797a634ada6d1 authored over 5 years ago by Matt R. Wilson <[email protected]>
chore(package): update async to version 3.0.1

c9b6f5f7a49c75c0314695b87406fcffe473e43b authored over 5 years ago by greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>
docs(README): adapt badges for @latest release

9d5cda02efac32967babc8264bb4ae61795ad88d authored over 5 years ago by Gregor Martynus <[email protected]>
style(test_intercept): Convert a bunch of arrow functions

98951fbaa3214f70fc39c6135d38dbad4c02592c authored over 5 years ago by Paul Melnikow <[email protected]>
refactor: Convert DelayedBody to a class (#1634)

As the start of some modernization / stylistic updates, I started converting the Foo.prototype's...

abfc40a196dc0f2f04e4e61b6c051a330d0b0885 authored over 5 years ago by Paul Melnikow <[email protected]>
Clean up some more hostnames in tests (#1627)

Ref #1351

4a9aa5d5d85651db88415317b9c9a5ae4e3f4376 authored over 5 years ago by Paul Melnikow <[email protected]>
feat: Throw error if request headers are not an object (#1574)

Throw if headersFieldNamesToLowerCase is not provided an object.
Adds a test to cover the excep...

a081c4d633aacf9f1604dddc2b59fd82b6cd454e authored over 5 years ago by Matt R. Wilson <[email protected]>
fix(types): use export = and declares (#1695)

* fix(types): use export = and declares

Fixes: #1694
From my testing, I haven't been able to...

b83e7207aa71635b0fcadbb24e3768953807eb50 authored over 5 years ago by Matt R. Wilson <[email protected]>
Display the badge correctly (#1637)

2da41bc2d3db43d25e12e06543792a7967ccba69 authored over 5 years ago by Paul Melnikow <[email protected]>
refactor: Scope.pendingMocks

Exact same logic, just consolidates the code using some newer JS.

763321d97c94735baee6c0e93fcd20196a3aef39 authored over 5 years ago by Matt R. Wilson <[email protected]>
feat: `afterRecord` support for custom formatting after recording. (#1682)

* ci(travis): run release stage on [Version].x, next, beta branches

* ci(package): update sem...

da840feae0366728fc99d10a9dd513b8903992c7 authored over 5 years ago by krackerman <[email protected]>
refactor: Refactor net connect tests (#1688)

Ref #1351

66799f312da5f46769ba521cab72d4f95f528c8b authored over 5 years ago by Paul Melnikow <[email protected]>
refactor: update ESLint to 6.0.0 (#1593)

* chore(package): update eslint to version 6.0.0
* chore: lockfile maintenance
* refactor: cha...

6959b4f1d366dccdda89de79a8eb838926f74020 authored over 5 years ago by Matt R. Wilson <[email protected]>
refactor(mixin): Remove dead code (#1295)

These two lines are not covered by code coverage. The function is called in one place, where it ...

191abc51b60499e63cd59ff297b0159d47991c1b authored over 5 years ago by Paul Melnikow <[email protected]>
feat: Throw an error on invalid truthy reply status codes (#1571)

6ad8a01295940bf75ae95d732ab4d0aed4e8e389 authored over 5 years ago by Matt R. Wilson <[email protected]>
fix: allow unmocked when providing literal search params. (#1614)

fixes: #1421

There was inconsistent behavior around how search params were handled
when they...

4e24959215ccb7d10bc5ea526d7e8ee7f5e89051 authored over 5 years ago by Matt R. Wilson <[email protected]>
test(test_data): Remove a wide-bracket regression test

This was a regression test for https://github.com/nock/nock/issues/328. It’s not clear exactly h...

e2b5bdcbca2f268058d26e4aa8b4668cd79614b9 authored over 5 years ago by Paul Melnikow <[email protected]>
refactor(socket): Remove dead code (#1296)

8c5e3e1e3cf24dc05d4dd980c4e066b96d569f35 authored over 5 years ago by Paul Melnikow <[email protected]>
test(test_intercept): Rewrite some tests using async, got, and local server

306589cf2cdccf98cb3a10a2904cc93b33c7f8bf authored over 5 years ago by Paul Melnikow <[email protected]>
feat: added noop method `unref` to Socket (#1612)

it has been implemented in node.js 0.9.1 but it's seldomly used.

ref: https://nodejs.org/api/...

bacaeb986c291e12ab25c5445faa13238d2685d5 authored over 5 years ago by Lorenzo Giuliani <[email protected]>
Set up Prettier

3ac2ee59469e641e2b9e802f06b79359b3bf151b authored over 5 years ago by Paul Melnikow <[email protected]>
chore(deps): bump eslint-utils from 1.4.0 to 1.4.2 (#1698)

Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.4.0 to 1.4.2.
- [Releas...

cfc129c6bb9e37e1f1067898cbf74d09ec6b2c2c authored over 5 years ago by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
refactor: replace some lodash usage with native (#1685)

For: #1285

Not logic changes, just making use of newer JS.

c0372a29c905013682978d9323ce6be4eb5254e9 authored over 5 years ago by Matt R. Wilson <[email protected]>
refactor: default options on recorder, remove dead code (#1641)

* chore: update some docstrs

* refactor(recorder): clean up default options using spread and ...

42c32b0fdf349e90fd6e49b05444fcd58864aad8 authored over 5 years ago by Matt R. Wilson <[email protected]>
feat: Support http.request signatures added in Node 10.9+ (#1588)

* Allow three arg form of `request` and `ClientRequest`.

Fixes #1227

Beginning with v10.9....

80b2ad44a02cd07047c92c1ed595756469a78aa5 authored over 5 years ago by Matt R. Wilson <[email protected]>
fix: Update and clarify how .reply() can be invoked with functions (#1520)

Ref https://github.com/nock/nock/pull/1517/files#r280139478
Closes #1222

a98f71e011a37a0a342aabc38b8d70a0640212bf authored over 5 years ago by Matt R. Wilson <[email protected]>
test(test_back): Cover both of the ‘no fs’ code paths

83a6270d93d238c841e4905740e746ff6e987846 authored over 5 years ago by Paul Melnikow <[email protected]>
refactor: add utility to return origin with non-standard ports (#1616)

For #1404 (code coverage)

We were doing this logic in several places and not always getting g...

3ce1c6c81f764c61e5d498ac394f99c951dca859 authored over 5 years ago by Matt R. Wilson <[email protected]>
refactor: Convert Interceptor to a class (#1672)

1f9c9f0a1568d762b23e0d0afdd654b74931796b authored over 5 years ago by Paul Melnikow <[email protected]>
ci(travis): cache: npm

See https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#caching-with-npm

572301df9a5ed67b168abd81184008fcdf8e8b46 authored over 5 years ago by Gregor Martynus <[email protected]>
refactor: special asterisk bodies in definitions. (#1579)

- Clarify and add test of definitions bodies that are simply "*".
- Emit deprecation warning wh...

d272a20a34b2508b2e36bc038a258d6402a74e7f authored over 5 years ago by Matt R. Wilson <[email protected]>
refactor: Convert Scope to a class (#1636)

a7c61e05386417b86c9cc13f9825fdabb514a938 authored over 5 years ago by Paul Melnikow <[email protected]>
feat(types): Add Typescript definitions. (#1676)

Fixes: #1670

Copies over the existing types and tests from DefinitelyTyped.
Includes updates...

9930e14bd7ac5cb1529d00d0475baf46803e7f66 authored over 5 years ago by Matt R. Wilson <[email protected]>
refactor: Fix some errors detected by LGTM (#1301)

https://lgtm.com/projects/g/nock/nock/alerts/?mode=list

20b315663367da6dcae7dca55e2815ed31a6ae80 authored over 5 years ago by Paul Melnikow <[email protected]>
test: Rewrite repeating tests using native async + got; improve assertions (#1569)

3f7f97ea2e50c30af4178cdea16715721dd9c9be authored over 5 years ago by Paul Melnikow <[email protected]>
style: Turn on some (mostly) autofixable rules

0798359b1c8664a628c0e7aef2ff0dda3d6183ad authored over 5 years ago by Paul Melnikow <[email protected]>
bug(overrider): unmocked HTTPS request with partial interceptor match (#1664)

Fixes: #1422

The `allowUnmocked` option is processed in two places. Once in the
intercept wh...

2102f195790534de9b4d0db2ecaf25f3fa673a28 authored over 5 years ago by Matt R. Wilson <[email protected]>
refactor: remove FakeTransformStream shim for old node versions (#1328)

e9ed4af535a34080cc5ef2e0497a6c10839e8dc5 authored over 5 years ago by Paul Melnikow <[email protected]>
docs: Remove unnecessary uses of filteringRequestBody. (#1578)

Before v2.0, it was not possible to **not** filter on request bodies.

For [users wanting](htt...

1af0aa2f65fb6f6384a122c6cbcd046bb18fba71 authored over 5 years ago by Matt R. Wilson <[email protected]>
feat(requestoverrider): Add method property to mocked requests (#1561)

c5a26d39bae0c587b43c43cca196abff33aed61b authored over 5 years ago by Maarten Rijke <[email protected]>
bug(recorder): replace qs lib with native querystring. (#1653)

The `qs` dependency was removed, however, recorder.js retained usage
of it. Replacing it with `...

ad856d30e4661640e57e4bc62c018459cf561038 authored over 5 years ago by Matt R. Wilson <[email protected]>
test: Some hostname cleanup (#1610)

Ref #1351

1afae0f03af58eb2ca26c8263098cfc565b2fc9e authored over 5 years ago by Paul Melnikow <[email protected]>
refactor: simplify some cases of common.formatQueryValue (#1598)

* refactor(common): replace lodash.forOwn with Array.reduce

This commit replaces usage of lod...

7a6bdbeac9a1dc564b2cfa95716bf5dae666cb02 authored over 5 years ago by Umair Sarfraz <[email protected]>
test(back): Fill in code coverage

`proxyquire` is a library I’ve used for testing library behavior when imports are present or abs...

22948c6a98c089fe8719b5b5bd389b5afc993c6b authored over 5 years ago by Paul Melnikow <[email protected]>
style: Autofixes

23899b85fa14647fe771d77a44583ab6ca4d510a authored over 5 years ago by Paul Melnikow <[email protected]>
feat(socket): propagate errors from destroy method (#1675)

Calling `destroy` on the the response, with an error, not correctly propagates through the socke...

41be8849b71ebcc34afa951e1138de0d5af150ae authored over 5 years ago by Filippo Conti <[email protected]>
test: Improve tests of badheaders (#1602)

466bd94b740ac0770c4bcd10080d7d8e06bbf475 authored over 5 years ago by Paul Melnikow <[email protected]>
style: prettier (#1311)

d8913b33b8e6afc10e1ac159de4cb1ec27dcd4cc authored over 5 years ago by Paul Melnikow <[email protected]>
bug: handle content-type request headers when arrays

Fixes #1642

9f79fff71bafa45a0e5caecc0d78ef985885b51f authored over 5 years ago by Matt R. Wilson <[email protected]>
fix: response.complete must be true after res.end (#1601)

Fixes https://github.com/nock/nock/issues/1493

https://nodejs.org/dist/latest-v10.x/docs/api/...

28db93e3f53d359f7718c68151291f78d39e8792 authored over 5 years ago by Aleksei Androsov <[email protected]>
fix: add extension to main field in package.json (#1683)

This doesn't add much value from Node's POV, since it can resolve it all
the same, however, som...

a334e920459df2865c5883405b7b067045f4a630 authored over 5 years ago by Matt R. Wilson <[email protected]>
test(test_common): Pick up some coverage (#1317)

47c5f0881163dbe9b9b13b8189decc879094c807 authored over 5 years ago by Paul Melnikow <[email protected]>
Update eslint-config-prettier to the latest version 🚀 (#1586)

* chore(package): update eslint-config-prettier to version 5.0.0

* chore(package): update loc...

1b793143503e3d0aa7e4ab0c1017d033bb12daa5 authored over 5 years ago by greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>