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

Remove uses of deprecated sinon.sandbox.create() #257

Merged
merged 1 commit into from
Feb 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions test/adapters/autocomplete-adapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ describe('AutoCompleteAdapter', () => {
};
}

beforeEach(() => {
(global as any).sinon = sinon.sandbox.create();
});
afterEach(() => {
(global as any).sinon.restore();
});

const request: ac.SuggestionsRequestedEvent = {
editor: createFakeEditor(),
bufferPosition: new Point(123, 456),
Expand Down
4 changes: 0 additions & 4 deletions test/adapters/datatip-adapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@ describe('DatatipAdapter', () => {
let connection: any;

beforeEach(() => {
(global as any).sinon = sinon.sandbox.create();
connection = new ls.LanguageClientConnection(createSpyConnection());
fakeEditor = createFakeEditor();
});
afterEach(() => {
(global as any).sinon.restore();
});

describe('canAdapt', () => {
it('returns true if hoverProvider is supported', () => {
Expand Down
7 changes: 0 additions & 7 deletions test/adapters/linter-push-v2-adapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ import { Point, Range } from 'atom';
import { createSpyConnection, createFakeEditor } from '../helpers.js';

describe('LinterPushV2Adapter', () => {
beforeEach(() => {
(global as any).sinon = sinon.sandbox.create();
});
afterEach(() => {
(global as any).sinon.restore();
});

describe('constructor', () => {
it('subscribes to onPublishDiagnostics', () => {
const languageClient = new ls.LanguageClientConnection(createSpyConnection());
Expand Down
8 changes: 0 additions & 8 deletions test/adapters/outline-view-adapter.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import OutlineViewAdapter from '../../lib/adapters/outline-view-adapter';
import * as ls from '../../lib/languageclient';
import * as sinon from 'sinon';
import { expect } from 'chai';
import { Point } from 'atom';

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

beforeEach(() => {
(global as any).sinon = sinon.sandbox.create();
});
afterEach(() => {
(global as any).sinon.restore();
});

describe('canAdapt', () => {
it('returns true if documentSymbolProvider is supported', () => {
const result = OutlineViewAdapter.canAdapt({ documentSymbolProvider: true });
Expand Down
7 changes: 0 additions & 7 deletions test/languageclient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ import { createSpyConnection } from './helpers.js';
import { NullLogger } from '../lib/logger';

describe('LanguageClientConnection', () => {
beforeEach(() => {
(global as any).sinon = sinon.sandbox.create();
});
afterEach(() => {
(global as any).sinon.restore();
});

it('listens to the RPC connection it is given', () => {
const rpc = createSpyConnection();

Expand Down