Skip to content

Commit

Permalink
Spelling (#2398)
Browse files Browse the repository at this point in the history
* spelling: accessor

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: active

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: addressing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: arguments

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: behavior

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: configurable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: expectation

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: expectations

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: falsy

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: function

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: immediate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: individual

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: inherited

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: maximilian

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: occurred

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: output

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: prototype

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: receive

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: sandbox

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: separate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: specifier

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: superseded

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: symmetric

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: targeting

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: the

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unrelated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
  • Loading branch information
jsoref and jsoref committed Nov 3, 2021
1 parent e78a670 commit b0cf544
Show file tree
Hide file tree
Showing 17 changed files with 44 additions and 44 deletions.
20 changes: 10 additions & 10 deletions CHANGES.md
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/_howto/stub-dependency.md
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/_sass/bootstrap/_input-groups.scss
Expand Up @@ -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;
Expand Down
20 changes: 10 additions & 10 deletions docs/changelog.md
Expand Up @@ -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
==================
Expand Down Expand Up @@ -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
==================
Expand Down Expand Up @@ -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
==================
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/release-source/release/fake-xhr-and-server.md
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/release-source/release/spy-call.md
Expand Up @@ -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)`

Expand Down
2 changes: 1 addition & 1 deletion docs/release-source/release/utils.md
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion docs/releases.html
Expand Up @@ -54,7 +54,7 @@ <h2 id="npm-cdns">Using NPM based CDNs</h2>
<a href="https://cdnjs.com">cdnjs</a>.
</p>
<p>
Their adressing schemes vary, but an example url such as
Their addressing schemes vary, but an example url such as
<a href="https://cdn.jsdelivr.net/npm/sinon@3/pkg/sinon.js"
>https://cdn.jsdelivr.net/npm/sinon@3/pkg/sinon.js</a
>
Expand Down
2 changes: 1 addition & 1 deletion lib/sinon/promise.js
Expand Up @@ -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.
*
Expand Down
10 changes: 5 additions & 5 deletions lib/sinon/proxy.js
Expand Up @@ -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}`;
});
},

Expand Down
2 changes: 1 addition & 1 deletion lib/sinon/util/core/extend.js
Expand Up @@ -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
*/

Expand Down
4 changes: 2 additions & 2 deletions test/assert-test.js
Expand Up @@ -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);
});
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion test/extend-test.js
Expand Up @@ -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",
};
Expand Down
4 changes: 2 additions & 2 deletions test/issues/issues-test.js
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/sandbox-test.js
Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions test/stub-test.js
Expand Up @@ -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();
});
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions test/util/fake-timers-test.js
Expand Up @@ -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);
});
}
Expand All @@ -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);
});
}
Expand Down

0 comments on commit b0cf544

Please sign in to comment.