Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 3b682e5

Browse files
author
Winston Liu
authored
Merge pull request #257 from atom/wl-sinon-deprecations
Remove uses of deprecated sinon.sandbox.create()
2 parents e27bb43 + 7f31643 commit 3b682e5

5 files changed

+0
-33
lines changed

test/adapters/autocomplete-adapter.test.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ describe('AutoCompleteAdapter', () => {
2323
};
2424
}
2525

26-
beforeEach(() => {
27-
(global as any).sinon = sinon.sandbox.create();
28-
});
29-
afterEach(() => {
30-
(global as any).sinon.restore();
31-
});
32-
3326
const request: ac.SuggestionsRequestedEvent = {
3427
editor: createFakeEditor(),
3528
bufferPosition: new Point(123, 456),

test/adapters/datatip-adapter.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,9 @@ describe('DatatipAdapter', () => {
1111
let connection: any;
1212

1313
beforeEach(() => {
14-
(global as any).sinon = sinon.sandbox.create();
1514
connection = new ls.LanguageClientConnection(createSpyConnection());
1615
fakeEditor = createFakeEditor();
1716
});
18-
afterEach(() => {
19-
(global as any).sinon.restore();
20-
});
2117

2218
describe('canAdapt', () => {
2319
it('returns true if hoverProvider is supported', () => {

test/adapters/linter-push-v2-adapter.test.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@ import { Point, Range } from 'atom';
88
import { createSpyConnection, createFakeEditor } from '../helpers.js';
99

1010
describe('LinterPushV2Adapter', () => {
11-
beforeEach(() => {
12-
(global as any).sinon = sinon.sandbox.create();
13-
});
14-
afterEach(() => {
15-
(global as any).sinon.restore();
16-
});
17-
1811
describe('constructor', () => {
1912
it('subscribes to onPublishDiagnostics', () => {
2013
const languageClient = new ls.LanguageClientConnection(createSpyConnection());

test/adapters/outline-view-adapter.test.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import OutlineViewAdapter from '../../lib/adapters/outline-view-adapter';
22
import * as ls from '../../lib/languageclient';
3-
import * as sinon from 'sinon';
43
import { expect } from 'chai';
54
import { Point } from 'atom';
65

@@ -14,13 +13,6 @@ describe('OutlineViewAdapter', () => {
1413
range: createRange(a, b, c, d),
1514
});
1615

17-
beforeEach(() => {
18-
(global as any).sinon = sinon.sandbox.create();
19-
});
20-
afterEach(() => {
21-
(global as any).sinon.restore();
22-
});
23-
2416
describe('canAdapt', () => {
2517
it('returns true if documentSymbolProvider is supported', () => {
2618
const result = OutlineViewAdapter.canAdapt({ documentSymbolProvider: true });

test/languageclient.test.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ import { createSpyConnection } from './helpers.js';
55
import { NullLogger } from '../lib/logger';
66

77
describe('LanguageClientConnection', () => {
8-
beforeEach(() => {
9-
(global as any).sinon = sinon.sandbox.create();
10-
});
11-
afterEach(() => {
12-
(global as any).sinon.restore();
13-
});
14-
158
it('listens to the RPC connection it is given', () => {
169
const rpc = createSpyConnection();
1710

0 commit comments

Comments
 (0)