Skip to content

Commit

Permalink
chore(deps): bump sinon from 7.5.0 to 11.1.1 (#618)
Browse files Browse the repository at this point in the history
* chore(deps): bump sinon from 7.5.0 to 11.1.1

Bumps [sinon](https://github.com/sinonjs/sinon) from 7.5.0 to 11.1.1.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md)
- [Commits](sinonjs/sinon@v7.5.0...v11.1.1)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* test: Change tests to use `calledWithMatch` instead of `calledWith`

Starting with sinon 11.1, `calledWith` doesn't work with sinon-chrome it seems.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Erek Speed <melink14@gmail.com>
  • Loading branch information
dependabot[bot] and melink14 authored Jul 19, 2021
1 parent eee42c7 commit d0f0ea7
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 61 deletions.
4 changes: 2 additions & 2 deletions extension/test/background_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ describe('background.ts', () => {
type: 'forceDocsHtml?',
});

expect(chrome.tabs.sendMessage).to.have.been.calledWith(
expect(chrome.tabs.sendMessage).to.have.been.calledWithMatch(
/* tabId= */ sinon.match.any,
sinon.match({ type: 'showPopup' })
{ type: 'showPopup' }
);
});
});
Expand Down
19 changes: 10 additions & 9 deletions extension/test/rikaicontent_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ describe('RcxContent', () => {

executeShowForGivenNode(rcxContent, span);

expect(chrome.runtime.sendMessage).to.have.been.calledWith(
sinon.match({ type: 'xsearch', text: '試す' }),
expect(chrome.runtime.sendMessage).to.have.been.calledWithMatch(
{ type: 'xsearch', text: '試す' },
sinon.match.any
);
});
Expand All @@ -41,8 +41,8 @@ describe('RcxContent', () => {

executeShowForGivenNode(rcxContent, span);

expect(chrome.runtime.sendMessage).to.have.been.calledWith(
sinon.match({ type: 'xsearch', text: '試す' }),
expect(chrome.runtime.sendMessage).to.have.been.calledWithMatch(
{ type: 'xsearch', text: '試す' },
sinon.match.any
);
});
Expand All @@ -57,8 +57,8 @@ describe('RcxContent', () => {

executeShowForGivenNode(rcxContent, span);

expect(chrome.runtime.sendMessage).to.have.been.calledWith(
sinon.match({ type: 'xsearch', text: '試testす' }),
expect(chrome.runtime.sendMessage).to.have.been.calledWithMatch(
{ type: 'xsearch', text: '試testす' },
sinon.match.any
);
});
Expand Down Expand Up @@ -94,9 +94,10 @@ describe('RcxContent', () => {
// Tick the clock forward to account for the popup delay.
clock.tick(1);

expect(chrome.runtime.sendMessage).to.have.been.calledWith(
sinon.match({ type: 'xsearch', text: '先生test' })
);
expect(chrome.runtime.sendMessage).to.have.been.calledWithMatch({
type: 'xsearch',
text: '先生test',
});
});
});
});
Expand Down
163 changes: 114 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"semantic-release": "^17.4.4",
"semantic-release-chrome": "^1.1.3",
"simulant": "^0.2.2",
"sinon": "^7.5.0",
"sinon": "^11.1.1",
"sinon-chai": "^3.7.0",
"sinon-chrome": "^3.0.1",
"snowpack": "^3.8.2",
Expand Down

0 comments on commit d0f0ea7

Please sign in to comment.