From 63c9baa33c1bdcb0883f4ffdb6243d4c31b5f895 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:54:25 -0400 Subject: [PATCH 01/26] spelling: accessor Signed-off-by: Josh Soref --- CHANGES.md | 2 +- docs/changelog.md | 2 +- lib/sinon/util/core/extend.js | 2 +- test/extend-test.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b5abc070e..111565afe 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,7 +3,7 @@ ## 11.1.2 - Upgrade @sinonjs/fake-timers to latest, see https://github.com/sinonjs/fake-timers/blob/master/CHANGELOG.md#712--2021-05-28 -- Copy over acessor properties to target object #2387 +- Copy over accessor properties to target object #2387 ## 11.1.1 diff --git a/docs/changelog.md b/docs/changelog.md index a6c437622..d062ab284 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -9,7 +9,7 @@ permalink: /releases/changelog ================== * Upgrade @sinonjs/fake-timers to latest, see https://github.com/sinonjs/fake-timers/blob/master/CHANGELOG.md#712--2021-05-28 - * Copy over acessor properties to target object #2387 + * Copy over accessor properties to target object #2387 11.1.1 / 2021-05-26 ================== diff --git a/lib/sinon/util/core/extend.js b/lib/sinon/util/core/extend.js index d7fadbad9..dad0d588f 100644 --- a/lib/sinon/util/core/extend.js +++ b/lib/sinon/util/core/extend.js @@ -108,7 +108,7 @@ module.exports = function extend(target, ...sources) { }; /* if the sorce has an Accessor property copy over the accessor functions (get and set) - data properties has writable attribute where as acessor property don't + data properties has writable attribute where as accessor property don't REF: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#properties */ diff --git a/test/extend-test.js b/test/extend-test.js index 0400cb0f5..50b963cd9 100644 --- a/test/extend-test.js +++ b/test/extend-test.js @@ -78,7 +78,7 @@ describe("extend", function () { assert.equals(result, expected); }); - it("copies acessor properties into the target", function () { + it("copies accessor properties into the target", function () { var target = { hello: "hello", }; From 974a3aeb0966f3173fa5066e8436574630e687ab Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 21:02:38 -0400 Subject: [PATCH 02/26] spelling: active Signed-off-by: Josh Soref --- docs/_sass/bootstrap/_input-groups.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_sass/bootstrap/_input-groups.scss b/docs/_sass/bootstrap/_input-groups.scss index 1a9a57ddb..57907e54f 100755 --- a/docs/_sass/bootstrap/_input-groups.scss +++ b/docs/_sass/bootstrap/_input-groups.scss @@ -138,7 +138,7 @@ font-size: 0; white-space: nowrap; - // Negative margin for spacing, position for bringing hovered/focused/actived + // Negative margin for spacing, position for bringing hovered/focused/active // element above the siblings. > .btn { position: relative; From e5ebb0a2b7b542d8cf51a71624fc34ba23db743a Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:54:28 -0400 Subject: [PATCH 03/26] spelling: addressing Signed-off-by: Josh Soref --- docs/releases.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/releases.html b/docs/releases.html index 9ccad6f4e..0b8b52085 100644 --- a/docs/releases.html +++ b/docs/releases.html @@ -54,7 +54,7 @@

Using NPM based CDNs

cdnjs.

- Their adressing schemes vary, but an example url such as + Their addressing schemes vary, but an example url such as https://cdn.jsdelivr.net/npm/sinon@3/pkg/sinon.js From 5f5b5550154364ceed515101f36ac074c6f00c06 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:54:29 -0400 Subject: [PATCH 04/26] spelling: arguments Signed-off-by: Josh Soref --- test/assert-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/assert-test.js b/test/assert-test.js index 95e49d8ad..c98617aab 100644 --- a/test/assert-test.js +++ b/test/assert-test.js @@ -105,7 +105,7 @@ describe("assert", function () { assert(sinonAssert.fail.calledOnce); }); - it("passes when argumens match", function () { + it("passes when arguments match", function () { sinonAssert.match("foo", "foo"); assert(sinonAssert.pass.calledOnce); }); From cfa91ca1799941a4c869c53c1ca91cfcc247fed9 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:54:31 -0400 Subject: [PATCH 05/26] spelling: behavior Signed-off-by: Josh Soref --- test/stub-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/stub-test.js b/test/stub-test.js index 9a0ef4ce0..da29f1799 100644 --- a/test/stub-test.js +++ b/test/stub-test.js @@ -720,7 +720,7 @@ describe("stub", function () { ); }); - it("should be reset by .resetBeahvior", function () { + it("should be reset by .resetBehavior", function () { var stub = createStub(); stub.throwsArg(0); From 03aa0057e86ad7f5e06377a825b997feed141ae1 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:54:32 -0400 Subject: [PATCH 06/26] spelling: configurable Signed-off-by: Josh Soref --- test/issues/issues-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/issues/issues-test.js b/test/issues/issues-test.js index 277d1bfd2..58bb5924a 100644 --- a/test/issues/issues-test.js +++ b/test/issues/issues-test.js @@ -318,7 +318,7 @@ describe("issues", function () { ); //backup val Object.defineProperty(window, "innerHeight", { value: 10, - configureable: true, + configurable: true, writeable: true, }); Object.defineProperty(window, "innerHeight", preDescriptor); //restore From a57a52423347929fd86f1b2b3889c26d5f832dbc Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:54:38 -0400 Subject: [PATCH 07/26] spelling: expectation Signed-off-by: Josh Soref --- CHANGES.md | 4 ++-- docs/changelog.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 111565afe..35e1f59f2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -843,7 +843,7 @@ The major release is caused by removing old mistakes and upgrading dependencies - Add support for es6 Symbol to wrapMethod method - Convert values to strings with toString instead of String() - Add typeOf matcher for symbol type -- Make expectetation fail as expected when called with wrong Symbol +- Make expectation fail as expected when called with wrong Symbol - Make mock report expected TypeError when expecting number and given symbol - Add support for es6 Symbol to match.has method - Make error message when failing to stub method support es6 symbol @@ -1251,7 +1251,7 @@ The major release is caused by removing old mistakes and upgrading dependencies - Ensure window.Image can be stubbed. (Adrian Phinney) - Fix spy() in IE 8 (Scott Andrews) - Fix sinon base in IE 8 (Scott Andrews) -- Format arguments ouput when mock excpetation is not met (kbackowski) +- Format arguments ouput when mock expectation is not met (kbackowski) - Calling spy.reset directly from stub.reset (Thomas Meyer) ## 1.5.0 diff --git a/docs/changelog.md b/docs/changelog.md index d062ab284..dee2a3acc 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -972,7 +972,7 @@ v2.0.0-pre.5 / 2016-12-31 * Add support for es6 Symbol to wrapMethod method * Convert values to strings with toString instead of String() * Add typeOf matcher for symbol type - * Make expectetation fail as expected when called with wrong Symbol + * Make expectation fail as expected when called with wrong Symbol * Make mock report expected TypeError when expecting number and given symbol * Add support for es6 Symbol to match.has method * Make error message when failing to stub method support es6 symbol @@ -1374,7 +1374,7 @@ v2.0.0-pre.5 / 2016-12-31 * Ensure window.Image can be stubbed. (Adrian Phinney) * Fix spy() in IE 8 (Scott Andrews) * Fix sinon base in IE 8 (Scott Andrews) -* Format arguments ouput when mock excpetation is not met (kbackowski) +* Format arguments ouput when mock expectation is not met (kbackowski) * Calling spy.reset directly from stub.reset (Thomas Meyer) == 1.5.0 / 2012-10-19 From b0a9911d5b5ca90705c7b36ee493c48e2d1ece24 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:54:39 -0400 Subject: [PATCH 08/26] spelling: expectations Signed-off-by: Josh Soref --- CHANGES.md | 2 +- docs/changelog.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 35e1f59f2..28c80e70c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1413,7 +1413,7 @@ The major release is caused by removing old mistakes and upgrading dependencies yieldsTo can invoke callbacks in object "options" arguments. - Allow sandboxes/collections to stub any property so long as the object has the property as an own property -- Significantly improve error reporting from failed mock expecations. Now prints +- Significantly improve error reporting from failed mock expectations. Now prints all met and unmet expectations with expected and received arguments - Allow mock expectations to be consumed in any order - Add pretty printing of all calls when assertions fail diff --git a/docs/changelog.md b/docs/changelog.md index dee2a3acc..01fe7f7ef 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1526,7 +1526,7 @@ v2.0.0-pre.5 / 2016-12-31 yieldsTo can invoke callbacks in object "options" arguments. * Allow sandboxes/collections to stub any property so long as the object has the property as an own property -* Significantly improve error reporting from failed mock expecations. Now prints +* Significantly improve error reporting from failed mock expectations. Now prints all met and unmet expectations with expected and received arguments * Allow mock expectations to be consumed in any order * Add pretty printing of all calls when assertions fail From 40772a961c82ff3d1d87d46ae77c0d957b755a45 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:54:42 -0400 Subject: [PATCH 09/26] spelling: falsy Signed-off-by: Josh Soref --- CHANGES.md | 2 +- docs/changelog.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 28c80e70c..7972402c7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1183,7 +1183,7 @@ The major release is caused by removing old mistakes and upgrading dependencies - Update call properties even if exceptions are thrown (Tim Perry) - Reverse matching order for fake server (Gordon L. Hempton) - Fix restoring globals on another frame fails on Firefox (Burak Yiğit Kaya) -- Handle stubbing falsey properties (Tim Perry) +- Handle stubbing falsy properties (Tim Perry) - Set returnValues correctly when the spied function is called as a constructor (Tim Perry) - When creating a sandbox, do not overwrite existing properties when inject properties into an object (Sergio Cinos) diff --git a/docs/changelog.md b/docs/changelog.md index 01fe7f7ef..7f0373fb9 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1309,7 +1309,7 @@ v2.0.0-pre.5 / 2016-12-31 * Update call properties even if exceptions are thrown (Tim Perry) * Reverse matching order for fake server (Gordon L. Hempton) * Fix restoring globals on another frame fails on Firefox (Burak Yiğit Kaya) -* Handle stubbing falsey properties (Tim Perry) +* Handle stubbing falsy properties (Tim Perry) * Set returnValues correctly when the spied function is called as a constructor (Tim Perry) * When creating a sandbox, do not overwrite existing properties when inject properties into an object (Sergio Cinos) From 0305ad0cb6721bc59a55dade89742d56a9941025 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:54:44 -0400 Subject: [PATCH 10/26] spelling: function Signed-off-by: Josh Soref --- lib/sinon/promise.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sinon/promise.js b/lib/sinon/promise.js index 75bcf4b5a..c0d91cf7a 100644 --- a/lib/sinon/promise.js +++ b/lib/sinon/promise.js @@ -8,7 +8,7 @@ var STATUS_RESOLVED = "resolved"; var STATUS_REJECTED = "rejected"; /** - * Returns a fake for a given function or undefined. If no functino is given, a + * Returns a fake for a given function or undefined. If no function is given, a * new fake is returned. If the given function is already a fake, it is * returned as is. Otherwise the given function is wrapped in a new fake. * From 4c6a19adc484ed804e649535d82f91146d773c7f Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:54:47 -0400 Subject: [PATCH 11/26] spelling: immediate Signed-off-by: Josh Soref --- CHANGES.md | 2 +- docs/changelog.md | 2 +- test/util/fake-timers-test.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 7972402c7..9b717cfd3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1015,7 +1015,7 @@ The major release is caused by removing old mistakes and upgrading dependencies ## 1.17.0 -- Fix #821 where Sinon.JS would leak a setImmdiate into global scope +- Fix #821 where Sinon.JS would leak a setImmediate into global scope - Removed sinon-timers from the build. refs #811 - Added flag that, when set to true, makes sinon.logError throw errors synchronously. - Fix #777: Support non-enumerable props when stubbing objects diff --git a/docs/changelog.md b/docs/changelog.md index 7f0373fb9..0ed71e736 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1146,7 +1146,7 @@ v2.0.0-pre.5 / 2016-12-31 1.17.0 / 2015-09-22 ================== - * Fix #821 where Sinon.JS would leak a setImmdiate into global scope + * Fix #821 where Sinon.JS would leak a setImmediate into global scope * Removed sinon-timers from the build. refs #811 * Added flag that, when set to true, makes sinon.logError throw errors synchronously. * Fix #777: Support non-enumerable props when stubbing objects diff --git a/test/util/fake-timers-test.js b/test/util/fake-timers-test.js index bb554934a..75a058e35 100644 --- a/test/util/fake-timers-test.js +++ b/test/util/fake-timers-test.js @@ -186,7 +186,7 @@ describe("fakeTimers.clock", function () { assert(stub.calledWithExactly("value1", 2)); }); } else { - it("shouldn't install setImmedate", function () { + it("shouldn't install setImmediate", function () { refute.isFunction(this.clock.setImmediate); }); } @@ -208,7 +208,7 @@ describe("fakeTimers.clock", function () { assert.isFalse(callback.called); }); } else { - it("shouldn't install clearImmedate", function () { + it("shouldn't install clearImmediate", function () { refute.isFunction(this.clock.clearImmediate); }); } From 4a207fcfd75b804c77cdab3777b7058888078760 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:54:52 -0400 Subject: [PATCH 12/26] spelling: individual Signed-off-by: Josh Soref --- docs/release-source/release/spy-call.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release-source/release/spy-call.md b/docs/release-source/release/spy-call.md index 75f07b945..5ac862ca1 100644 --- a/docs/release-source/release/spy-call.md +++ b/docs/release-source/release/spy-call.md @@ -6,7 +6,7 @@ breadcrumb: spy-call ## Spy call -A spy call is an object representation of an invididual call to a _spied_ function, which could be a [fake](../fakes), [spy](../spies), [stub](../stubs) or [mock method](../mocks). +A spy call is an object representation of an individual call to a _spied_ function, which could be a [fake](../fakes), [spy](../spies), [stub](../stubs) or [mock method](../mocks). ### `var spyCall = spy.getCall(n)` From 2f6552602d861593b3c764cdc7dfdd0f3e146e02 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:54:50 -0400 Subject: [PATCH 13/26] spelling: inherited Signed-off-by: Josh Soref --- test/issues/issues-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/issues/issues-test.js b/test/issues/issues-test.js index 58bb5924a..aa80f8f57 100644 --- a/test/issues/issues-test.js +++ b/test/issues/issues-test.js @@ -78,7 +78,7 @@ describe("issues", function () { }); }); - describe("#852 - createStubInstance on intherited constructors", function () { + describe("#852 - createStubInstance on inherited constructors", function () { it("must not throw error", function () { var A = function () { return; From f706a6a7a10da693bc7c22185c0842971e9e5817 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:54:54 -0400 Subject: [PATCH 14/26] spelling: maximilian Signed-off-by: Josh Soref --- CHANGES.md | 2 +- docs/changelog.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9b717cfd3..b05e96cbe 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1279,7 +1279,7 @@ The major release is caused by removing old mistakes and upgrading dependencies ## 1.4.0 -- Argument matchers (Maximillian Antoni) +- Argument matchers (Maximilian Antoni) sinon.match.{any, same, typeOf, instanceOf, has, hasOwn, defined, truthy, falsy} as well as typeOf shortcuts for boolean, number, string, object, function, array, regexp and date. The result of a call can be used with diff --git a/docs/changelog.md b/docs/changelog.md index 0ed71e736..127500589 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1398,7 +1398,7 @@ v2.0.0-pre.5 / 2016-12-31 (which provides a shim process object) == 1.4.0 / 2012-07-09 -* Argument matchers (Maximillian Antoni) +* Argument matchers (Maximilian Antoni) sinon.match.{any, same, typeOf, instanceOf, has, hasOwn, defined, truthy, falsy} as well as typeOf shortcuts for boolean, number, string, object, function, array, regexp and date. The result of a call can be used with From 92425c9fed0c54491f0cb69048216a9a19a95a28 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:55:00 -0400 Subject: [PATCH 15/26] spelling: occurred Signed-off-by: Josh Soref --- test/assert-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/assert-test.js b/test/assert-test.js index c98617aab..64964183e 100644 --- a/test/assert-test.js +++ b/test/assert-test.js @@ -2310,7 +2310,7 @@ describe("assert", function () { it( "should indicate that an assertion failure with a symbol method name " + - "occured in exception messages, even if the symbol has no description", + "occurred in exception messages, even if the symbol has no description", function () { // eslint-disable-next-line symbol-description var symbol = Symbol(); From 278c15751191eb19108335bc89b2f584ed33c0c5 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:55:02 -0400 Subject: [PATCH 16/26] spelling: output Signed-off-by: Josh Soref --- CHANGES.md | 2 +- docs/changelog.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b05e96cbe..b0faced08 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1251,7 +1251,7 @@ The major release is caused by removing old mistakes and upgrading dependencies - Ensure window.Image can be stubbed. (Adrian Phinney) - Fix spy() in IE 8 (Scott Andrews) - Fix sinon base in IE 8 (Scott Andrews) -- Format arguments ouput when mock expectation is not met (kbackowski) +- Format arguments output when mock expectation is not met (kbackowski) - Calling spy.reset directly from stub.reset (Thomas Meyer) ## 1.5.0 diff --git a/docs/changelog.md b/docs/changelog.md index 127500589..ffd15fb43 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1374,7 +1374,7 @@ v2.0.0-pre.5 / 2016-12-31 * Ensure window.Image can be stubbed. (Adrian Phinney) * Fix spy() in IE 8 (Scott Andrews) * Fix sinon base in IE 8 (Scott Andrews) -* Format arguments ouput when mock expectation is not met (kbackowski) +* Format arguments output when mock expectation is not met (kbackowski) * Calling spy.reset directly from stub.reset (Thomas Meyer) == 1.5.0 / 2012-10-19 From 92ab0b1044c690e7ae4c88a563975fb317b7afd6 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:55:04 -0400 Subject: [PATCH 17/26] spelling: prototype Signed-off-by: Josh Soref --- docs/release-source/release/utils.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release-source/release/utils.md b/docs/release-source/release/utils.md index 29bf4b069..98f1e6da0 100644 --- a/docs/release-source/release/utils.md +++ b/docs/release-source/release/utils.md @@ -10,7 +10,7 @@ Sinon.JS has a few utilities used internally in `lib/sinon.js`. Unless the metho #### `sinon.createStubInstance(constructor);` -Creates a new object with the given function as the protoype and stubs all implemented functions. +Creates a new object with the given function as the prototype and stubs all implemented functions. ```javascript class Container { From e17235b7ff57eb6185244e954bc88015dec46880 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:55:06 -0400 Subject: [PATCH 18/26] spelling: receive Signed-off-by: Josh Soref --- docs/release-source/release/fake-xhr-and-server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release-source/release/fake-xhr-and-server.md b/docs/release-source/release/fake-xhr-and-server.md index 29f098b9c..f096b5595 100644 --- a/docs/release-source/release/fake-xhr-and-server.md +++ b/docs/release-source/release/fake-xhr-and-server.md @@ -284,7 +284,7 @@ Causes all queued asynchronous requests to receive a response. If none of the responses added through `respondWith()` match, the default response is `[404, {}, ""]`. -Synchronous requests are responded to immediately so make sure to call `respondWith()` to configure the server response before calling `respond()`. If not, you will recieve the default `404 NOT FOUND` response. +Synchronous requests are responded to immediately so make sure to call `respondWith()` to configure the server response before calling `respond()`. If not, you will receive the default `404 NOT FOUND` response. If called with arguments, `respondWith()` will be called with those arguments before responding to requests. From e9140cb49baf4b590709857fd8bdb46aed877ed7 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:55:08 -0400 Subject: [PATCH 19/26] spelling: sandbox Signed-off-by: Josh Soref --- test/sandbox-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sandbox-test.js b/test/sandbox-test.js index 419ecbfc5..11612e198 100644 --- a/test/sandbox-test.js +++ b/test/sandbox-test.js @@ -1501,7 +1501,7 @@ describe("Sandbox", function () { assert.same(setTimeout, originalSetTimeout, "fakeTimers restored"); }); - it("restores spied fake timers when then sanddox is restored", function () { + it("restores spied fake timers when then sandbox is restored", function () { var originalSetTimeout = setTimeout; this.sandbox.useFakeTimers(); From d91f706ddf713af406413d861c932da596f983c0 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:55:10 -0400 Subject: [PATCH 20/26] spelling: separate Signed-off-by: Josh Soref --- CHANGES.md | 2 +- docs/changelog.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b0faced08..8e824e18d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -289,7 +289,7 @@ The major release is caused by removing old mistakes and upgrading dependencies ## 5.1.1 -- Remove ES2015 'module' field for 5x branch (fix in seperate branch - see tag) +- Remove ES2015 'module' field for 5x branch (fix in separate branch - see tag) ## 5.1.0 diff --git a/docs/changelog.md b/docs/changelog.md index ffd15fb43..86a311637 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -351,7 +351,7 @@ The major release is caused by removing old mistakes and upgrading dependencies 5.1.1 / 2018-06-07 ================== - * Remove ES2015 'module' field for 5x branch (fix in seperate branch - see tag) + * Remove ES2015 'module' field for 5x branch (fix in separate branch - see tag) 5.1.0 / 2018-06-06 ================== From 537ef68e5d23f16c555614b33ba6ef11aa077a82 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:55:12 -0400 Subject: [PATCH 21/26] spelling: specifier Signed-off-by: Josh Soref --- lib/sinon/proxy.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/sinon/proxy.js b/lib/sinon/proxy.js index 9712cc756..82505c536 100644 --- a/lib/sinon/proxy.js +++ b/lib/sinon/proxy.js @@ -120,16 +120,16 @@ var proxyApi = { var args = slice(arguments, 1); var formatter; - return (format || "").replace(/%(.)/g, function (match, specifyer) { - formatter = proxyApi.formatters[specifyer]; + return (format || "").replace(/%(.)/g, function (match, specifier) { + formatter = proxyApi.formatters[specifier]; if (typeof formatter === "function") { return String(formatter(spyInstance, args)); - } else if (!isNaN(parseInt(specifyer, 10))) { - return sinonFormat(args[specifyer - 1]); + } else if (!isNaN(parseInt(specifier, 10))) { + return sinonFormat(args[specifier - 1]); } - return `%${specifyer}`; + return `%${specifier}`; }); }, From d576af0b8850da008262400c0a4a17234973b6d2 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:55:14 -0400 Subject: [PATCH 22/26] spelling: superseded Signed-off-by: Josh Soref --- test/stub-test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/stub-test.js b/test/stub-test.js index da29f1799..eda1b39e9 100644 --- a/test/stub-test.js +++ b/test/stub-test.js @@ -279,7 +279,7 @@ describe("stub", function () { it("supersedes previous rejects", function () { var stub = createStub(); - stub.rejects(Error("should be superseeded")).resolves(1); + stub.rejects(Error("should be superseded")).resolves(1); return stub().then(); }); @@ -546,7 +546,7 @@ describe("stub", function () { it("supersedes previous rejects", function () { var stub = createStub(); - stub.rejects(Error("should be superseeded")).resolvesArg(1); + stub.rejects(Error("should be superseded")).resolvesArg(1); return stub("zero", "one").then(function (actual) { assert.same(actual, "one"); From e20844cb2a7b76b0a6cb21c25ab9bdd0194480ee Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:55:16 -0400 Subject: [PATCH 23/26] spelling: symmetric Signed-off-by: Josh Soref --- CHANGES.md | 2 +- docs/changelog.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 8e824e18d..013140eec 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -526,7 +526,7 @@ The major release is caused by removing old mistakes and upgrading dependencies ## 2.3.1 -- Make calledAfter symetric with calledBefore (#1407) +- Make calledAfter symmetric with calledBefore (#1407) ## 2.3.0 diff --git a/docs/changelog.md b/docs/changelog.md index 86a311637..039dde4aa 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -640,7 +640,7 @@ The major release is caused by removing old mistakes and upgrading dependencies 2.3.1 / 2017-05-23 ================== - * Make calledAfter symetric with calledBefore (#1407) + * Make calledAfter symmetric with calledBefore (#1407) 2.3.0 / 2017-05-22 ================== From 4c43f839b83ea29325b96872647117f1f7374ae5 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:55:17 -0400 Subject: [PATCH 24/26] spelling: targeting Signed-off-by: Josh Soref --- docs/_howto/stub-dependency.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_howto/stub-dependency.md b/docs/_howto/stub-dependency.md index 5dd4cb8eb..7f2cafb64 100644 --- a/docs/_howto/stub-dependency.md +++ b/docs/_howto/stub-dependency.md @@ -3,7 +3,7 @@ layout: page title: How to stub a dependency of a module --- -Sinon is a stubbing library, not a module interception library. Stubbing dependencies is highly dependant on your enviroment and the implementation. For Node environments, we usually recommend solutions targetting [link seams](../link-seams-commonjs/) or explicit dependency injection. Though in some more basic cases, you can get away with only using Sinon by modifying the module exports of the dependency. +Sinon is a stubbing library, not a module interception library. Stubbing dependencies is highly dependant on your enviroment and the implementation. For Node environments, we usually recommend solutions targeting [link seams](../link-seams-commonjs/) or explicit dependency injection. Though in some more basic cases, you can get away with only using Sinon by modifying the module exports of the dependency. To stub a dependency (imported module) of a module under test you have to import it explicitly in your test and stub the desired method. For the stubbing to work, the stubbed method cannot be [destructured](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment), neither in the module under test nor in the test. From 9cbd833ee2bc56ae84833deb9cc4f33ec8eda4da Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:59:26 -0400 Subject: [PATCH 25/26] spelling: the Signed-off-by: Josh Soref --- test/sandbox-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sandbox-test.js b/test/sandbox-test.js index 11612e198..7831ad927 100644 --- a/test/sandbox-test.js +++ b/test/sandbox-test.js @@ -1501,7 +1501,7 @@ describe("Sandbox", function () { assert.same(setTimeout, originalSetTimeout, "fakeTimers restored"); }); - it("restores spied fake timers when then sandbox is restored", function () { + it("restores spied fake timers when the sandbox is restored", function () { var originalSetTimeout = setTimeout; this.sandbox.useFakeTimers(); From 02a349e314d7caef950bf1f1b04342620a622193 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 18 Aug 2021 20:55:19 -0400 Subject: [PATCH 26/26] spelling: unrelated Signed-off-by: Josh Soref --- CHANGES.md | 2 +- docs/changelog.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 013140eec..7213fe68b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -998,7 +998,7 @@ The major release is caused by removing old mistakes and upgrading dependencies - cleaning up left over blank lines - CommonJS-ified _some_ of the things - updated readyStateChange to align to the w3c spec (somewhat) -- cleaned up a few unreleated tests +- cleaned up a few unrelated tests - updated tests to reflect reality - added some additional progress event verification - added a test to ensure load is not fired before abort diff --git a/docs/changelog.md b/docs/changelog.md index 039dde4aa..7290be13f 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1128,7 +1128,7 @@ v2.0.0-pre.5 / 2016-12-31 * cleaning up left over blank lines * CommonJS-ified *some* of the things * updated readyStateChange to align to the w3c spec (somewhat) - * cleaned up a few unreleated tests + * cleaned up a few unrelated tests * updated tests to reflect reality * added some additional progress event verification * added a test to ensure load is not fired before abort