Skip to content

Commit 08eb04f

Browse files
authored
chore: use sinon from the sinon package where possible, not ts-sinon MONGOSH-1501 (#1579)
* replace all simple usage of ts-sinon with sinon * use StubbedInstance type from sinon * Revert "use StubbedInstance type from sinon" This reverts commit 4613628. * don't import sinon from ts-sinon
1 parent ace7046 commit 08eb04f

40 files changed

+50
-32
lines changed

packages/async-rewriter2/.depcheckrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ignores:
55
- '@typescript-eslint/parser'
66
- '@typescript-eslint/eslint-plugin'
77
- chai
8+
- sinon
89
- sinon-chai
910
- ts-sinon
1011
- eslint-plugin-mocha

packages/async-rewriter2/src/async-writer-babel.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import childProcess from 'child_process';
33
import path from 'path';
44
import { promisify } from 'util';
55
import vm from 'vm';
6-
import sinon from 'ts-sinon';
6+
import sinon from 'sinon';
77
import chai, { expect } from 'chai';
88
import sinonChai from 'sinon-chai';
99
chai.use(sinonChai);

packages/browser-runtime-core/.depcheckrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ignores:
55
- '@typescript-eslint/parser'
66
- '@typescript-eslint/eslint-plugin'
77
- chai
8+
- sinon
89
- sinon-chai
910
- ts-sinon
1011
- eslint-plugin-mocha

packages/build/.depcheckrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ignores:
55
- '@typescript-eslint/parser'
66
- '@typescript-eslint/eslint-plugin'
77
- chai
8+
- sinon
89
- ts-sinon
910
- sinon
1011
- eslint-plugin-mocha

packages/build/src/download-center/artifacts.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from 'chai';
2-
import sinon from 'ts-sinon';
2+
import sinon from 'sinon';
33
import { uploadArtifactToDownloadCenter } from './artifacts';
44

55
describe('DownloadCenter artifacts', function () {

packages/build/src/download-center/config.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { DownloadCenterConfig } from '@mongodb-js/dl-center/dist/download-center-config';
22
import type { PackageInformationProvider } from '../packaging';
33
import { expect } from 'chai';
4-
import sinon from 'ts-sinon';
4+
import sinon from 'sinon';
55
import type { PackageVariant } from '../config';
66
import {
77
createVersionConfig,

packages/build/src/helpers/with-retries.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from 'chai';
2-
import sinon from 'ts-sinon';
2+
import sinon from 'sinon';
33
import { withRetries } from './';
44

55
describe('withRetries', function () {

packages/build/src/homebrew/generate-formula.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import chai, { expect } from 'chai';
2-
import sinon from 'ts-sinon';
2+
import sinon from 'sinon';
33
import type { GithubRepo } from '@mongodb-js/devtools-github-repo';
44
import { generateUpdatedFormula } from './generate-formula';
55

packages/build/src/homebrew/publish-to-homebrew.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import chai, { expect } from 'chai';
2-
import sinon from 'ts-sinon';
2+
import sinon from 'sinon';
33
import type { GithubRepo } from '@mongodb-js/devtools-github-repo';
44
import { publishToHomebrew } from './publish-to-homebrew';
55

packages/build/src/homebrew/update-homebrew-fork.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import chai, { expect } from 'chai';
2-
import sinon from 'ts-sinon';
2+
import sinon from 'sinon';
33
import { GithubRepo } from '@mongodb-js/devtools-github-repo';
44
import { updateHomebrewFork } from './update-homebrew-fork';
55

0 commit comments

Comments
 (0)