From b0cf5448993c2ace607cdf430b7e389d02c2f296 Mon Sep 17 00:00:00 2001
From: Josh Soref <2119212+jsoref@users.noreply.github.com>
Date: Wed, 3 Nov 2021 08:15:00 -0400
Subject: [PATCH] Spelling (#2398)
* spelling: accessor
Signed-off-by: Josh Soref
* spelling: active
Signed-off-by: Josh Soref
* spelling: addressing
Signed-off-by: Josh Soref
* spelling: arguments
Signed-off-by: Josh Soref
* spelling: behavior
Signed-off-by: Josh Soref
* spelling: configurable
Signed-off-by: Josh Soref
* spelling: expectation
Signed-off-by: Josh Soref
* spelling: expectations
Signed-off-by: Josh Soref
* spelling: falsy
Signed-off-by: Josh Soref
* spelling: function
Signed-off-by: Josh Soref
* spelling: immediate
Signed-off-by: Josh Soref
* spelling: individual
Signed-off-by: Josh Soref
* spelling: inherited
Signed-off-by: Josh Soref
* spelling: maximilian
Signed-off-by: Josh Soref
* spelling: occurred
Signed-off-by: Josh Soref
* spelling: output
Signed-off-by: Josh Soref
* spelling: prototype
Signed-off-by: Josh Soref
* spelling: receive
Signed-off-by: Josh Soref
* spelling: sandbox
Signed-off-by: Josh Soref
* spelling: separate
Signed-off-by: Josh Soref
* spelling: specifier
Signed-off-by: Josh Soref
* spelling: superseded
Signed-off-by: Josh Soref
* spelling: symmetric
Signed-off-by: Josh Soref
* spelling: targeting
Signed-off-by: Josh Soref
* spelling: the
Signed-off-by: Josh Soref
* spelling: unrelated
Signed-off-by: Josh Soref
Co-authored-by: Josh Soref
---
CHANGES.md | 20 +++++++++----------
docs/_howto/stub-dependency.md | 2 +-
docs/_sass/bootstrap/_input-groups.scss | 2 +-
docs/changelog.md | 20 +++++++++----------
.../release/fake-xhr-and-server.md | 2 +-
docs/release-source/release/spy-call.md | 2 +-
docs/release-source/release/utils.md | 2 +-
docs/releases.html | 2 +-
lib/sinon/promise.js | 2 +-
lib/sinon/proxy.js | 10 +++++-----
lib/sinon/util/core/extend.js | 2 +-
test/assert-test.js | 4 ++--
test/extend-test.js | 2 +-
test/issues/issues-test.js | 4 ++--
test/sandbox-test.js | 2 +-
test/stub-test.js | 6 +++---
test/util/fake-timers-test.js | 4 ++--
17 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/CHANGES.md b/CHANGES.md
index b5abc070e..7213fe68b 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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)
@@ -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 output when mock expectation is not met (kbackowski)
- Calling spy.reset directly from stub.reset (Thomas Meyer)
## 1.5.0
@@ -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
@@ -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/_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.
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;
diff --git a/docs/changelog.md b/docs/changelog.md
index a6c437622..7290be13f 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
==================
@@ -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
==================
@@ -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
==================
@@ -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
@@ -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
@@ -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
@@ -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)
@@ -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 output when mock expectation is not met (kbackowski)
* Calling spy.reset directly from stub.reset (Thomas Meyer)
== 1.5.0 / 2012-10-19
@@ -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
@@ -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
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.
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)`
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 {
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
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.
*
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}`;
});
},
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/assert-test.js b/test/assert-test.js
index 7fcd282e5..c686026c0 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);
});
@@ -2322,7 +2322,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();
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",
};
diff --git a/test/issues/issues-test.js b/test/issues/issues-test.js
index 277d1bfd2..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;
@@ -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
diff --git a/test/sandbox-test.js b/test/sandbox-test.js
index 419ecbfc5..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 sanddox is restored", function () {
+ it("restores spied fake timers when the sandbox is restored", function () {
var originalSetTimeout = setTimeout;
this.sandbox.useFakeTimers();
diff --git a/test/stub-test.js b/test/stub-test.js
index 9a0ef4ce0..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");
@@ -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);
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);
});
}