Skip to content

Commit

Permalink
Update: Sinon to v4.1.2 & remove autobind-decorator (#47)
Browse files Browse the repository at this point in the history
* Chore: Removing deprecated sinon.stub(object, "method", func)
  • Loading branch information
pramodsum authored Nov 27, 2017
1 parent d7ded88 commit eea7dcf
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 32 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"registry": "https://registry.npmjs.org/"
},
"devDependencies": {
"autobind-decorator": "^1.3.4",
"autoprefixer": "^7.1.6",
"babel-cli": "^6.26.0",
"babel-core": "^6.25.0",
Expand Down Expand Up @@ -77,7 +76,7 @@
"prettier-eslint-cli": "^4.1.1",
"raw-loader": "^0.5.1",
"sass-loader": "^6.0.6",
"sinon": "^1.17.7",
"sinon": "^4.1.2",
"sinon-chai": "^2.8.0",
"sinon-stub-promise": "^4.0.0",
"style-loader": "^0.19.0",
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/__tests__/AnnotationModeController-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ describe('controllers/AnnotationModeController', () => {
addEventListener: sandbox.stub()
}
};
sandbox.stub(controller, 'setupHandlers', () => {
sandbox.stub(controller, 'setupHandlers').callsFake(() => {
controller.handlers = [handlerObj];
});
expect(controller.handlers.length).to.equal(0);
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/__tests__/DrawingModeController-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ describe('controllers/DrawingModeController', () => {
addEventListener: sandbox.stub()
}
};
sandbox.stub(controller, 'setupHandlers', () => {
sandbox.stub(controller, 'setupHandlers').callsFake(() => {
controller.handlers = [handlerObj];
});
expect(controller.handlers.length).to.equal(0);
Expand Down Expand Up @@ -325,7 +325,7 @@ describe('controllers/DrawingModeController', () => {
};
sandbox.stub(controller, 'registerThread');
sandbox.stub(controller, 'unbindListeners');
sandbox.stub(controller, 'bindListeners', () => {
sandbox.stub(controller, 'bindListeners').callsFake(() => {
controller.currentThread = thread2;
});

Expand Down
2 changes: 1 addition & 1 deletion src/doc/__tests__/DocAnnotator-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ describe('doc/DocAnnotator', () => {

let timer = 0;
window.performance = window.performance || { now: () => {} };
sandbox.stub(window.performance, 'now', () => {
sandbox.stub(window.performance, 'now').callsFake(() => {
return (timer += 500);
});

Expand Down
77 changes: 51 additions & 26 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,6 @@ asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"

autobind-decorator@^1.3.4:
version "1.4.3"
resolved "https://registry.yarnpkg.com/autobind-decorator/-/autobind-decorator-1.4.3.tgz#4c96ffa77b10622ede24f110f5dbbf56691417d1"

autoprefixer@^6.3.1:
version "6.7.7"
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014"
Expand Down Expand Up @@ -2194,6 +2190,10 @@ [email protected]:
version "3.3.1"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75"

diff@^3.1.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c"

diffie-hellman@^5.0.0:
version "5.0.2"
resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e"
Expand Down Expand Up @@ -3016,11 +3016,11 @@ form-data@~2.3.1:
combined-stream "^1.0.5"
mime-types "^2.1.12"

formatio@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/formatio/-/formatio-1.1.1.tgz#5ed3ccd636551097383465d996199100e86161e9"
formatio@1.2.0, formatio@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/formatio/-/formatio-1.2.0.tgz#f3b2167d9068c4698a8d51f4f760a39a54d818eb"
dependencies:
samsam "~1.1"
samsam "1.x"

forwarded@~0.1.2:
version "0.1.2"
Expand Down Expand Up @@ -4109,6 +4109,10 @@ jsx-ast-utils@^2.0.0:
dependencies:
array-includes "^3.0.3"

just-extend@^1.1.26:
version "1.1.27"
resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-1.1.27.tgz#ec6e79410ff914e472652abfa0e603c03d60e905"

karma-chai-dom@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/karma-chai-dom/-/karma-chai-dom-1.1.0.tgz#1b36514822cbb5fa749d007de76e4221ae34cfa4"
Expand Down Expand Up @@ -4452,6 +4456,10 @@ lodash.get@^3.7.0:
lodash._baseget "^3.0.0"
lodash._topath "^3.0.0"

lodash.get@^4.4.2:
version "4.4.2"
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"

lodash.isarray@^3.0.0:
version "3.0.4"
resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
Expand Down Expand Up @@ -4538,9 +4546,13 @@ loglevel@^1.4.1:
version "1.6.0"
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.0.tgz#ae0caa561111498c5ba13723d6fb631d24003934"

[email protected]:
version "1.3.2"
resolved "https://registry.yarnpkg.com/lolex/-/lolex-1.3.2.tgz#7c3da62ffcb30f0f5a80a2566ca24e45d8a01f31"
lolex@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/lolex/-/lolex-1.6.0.tgz#3a9a0283452a47d7439e72731b9e07d7386e49f6"

lolex@^2.2.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/lolex/-/lolex-2.3.1.tgz#3d2319894471ea0950ef64692ead2a5318cff362"

longest@^1.0.1:
version "1.0.1"
Expand Down Expand Up @@ -4810,6 +4822,16 @@ [email protected]:
version "0.6.1"
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9"

nise@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/nise/-/nise-1.2.0.tgz#079d6cadbbcb12ba30e38f1c999f36ad4d6baa53"
dependencies:
formatio "^1.2.0"
just-extend "^1.1.26"
lolex "^1.6.0"
path-to-regexp "^1.7.0"
text-encoding "^0.6.4"

node-fetch@^1.0.1, node-fetch@^1.3.3:
version "1.7.3"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
Expand Down Expand Up @@ -6311,13 +6333,9 @@ [email protected], safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, s
version "5.1.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"

[email protected]:
version "1.1.2"
resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.1.2.tgz#bec11fdc83a9fda063401210e40176c3024d1567"

samsam@~1.1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.1.3.tgz#9f5087419b4d091f232571e7fa52e90b0f552621"
[email protected]:
version "1.3.0"
resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.3.0.tgz#8d1d9350e25622da30de3e44ba692b5221ab7c50"

sass-graph@^2.2.4:
version "2.2.4"
Expand Down Expand Up @@ -6465,14 +6483,17 @@ sinon-stub-promise@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/sinon-stub-promise/-/sinon-stub-promise-4.0.0.tgz#6d498ba1198557cd01e3466af92dc7df725192c2"

sinon@^1.17.7:
version "1.17.7"
resolved "https://registry.yarnpkg.com/sinon/-/sinon-1.17.7.tgz#4542a4f49ba0c45c05eb2e9dd9d203e2b8efe0bf"
sinon@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/sinon/-/sinon-4.1.2.tgz#65610521d926fb53742dd84cd599f0b89a82f440"
dependencies:
formatio "1.1.1"
lolex "1.3.2"
samsam "1.1.2"
util ">=0.10.3 <1"
diff "^3.1.0"
formatio "1.2.0"
lodash.get "^4.4.2"
lolex "^2.2.0"
nise "^1.2.0"
supports-color "^4.4.0"
type-detect "^4.0.0"

slash@^1.0.0:
version "1.0.0"
Expand Down Expand Up @@ -6946,6 +6967,10 @@ test-exclude@^4.1.1:
read-pkg-up "^1.0.1"
require-main-filename "^1.0.1"

text-encoding@^0.6.4:
version "0.6.4"
resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.6.4.tgz#e399a982257a276dae428bb92845cb71bdc26d19"

text-extensions@^1.0.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.7.0.tgz#faaaba2625ed746d568a23e4d0aacd9bf08a8b39"
Expand Down Expand Up @@ -7186,7 +7211,7 @@ util-deprecate@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"

[email protected], "util@>=0.10.3 <1", util@^0.10.3:
[email protected], util@^0.10.3:
version "0.10.3"
resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9"
dependencies:
Expand Down

0 comments on commit eea7dcf

Please sign in to comment.