Skip to content

Commit 265382e

Browse files
committed
drop --parallel
1 parent 8a8bc2e commit 265382e

File tree

5 files changed

+48
-7
lines changed

5 files changed

+48
-7
lines changed

packages/neovim/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"scripts": {
7272
"doc": "typedoc --out doc --exclude '**/*.test.ts' src",
7373
"prepublishOnly": "npm run build",
74-
"test": "mocha --exit --parallel --require ts-node/register --require src/testSetup.ts src/**/*.test.ts",
74+
"test": "mocha --exit --require ts-node/register --require src/testSetup.ts src/**/*.test.ts",
7575
"test-coverage": "c8 --reporter=json --reporter=html npm test",
7676
"test-staged": "npm test --bail",
7777
"test-missing-apis": "npm run build && node scripts/findMissingApi",

packages/neovim/src/api/Neovim.test.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
import * as path from 'node:path';
22
import assert from 'node:assert';
33
import expect from 'expect';
4-
import { nvim } from '../testUtil';
4+
import * as testUtil from '../testUtil';
55

66
describe('Neovim API', () => {
7+
let nvim: ReturnType<typeof testUtil.startNvim>[1];
8+
9+
before(async () => {
10+
[, nvim] = testUtil.startNvim();
11+
});
12+
13+
after(() => {
14+
testUtil.stopNvim();
15+
});
16+
717
describe('Normal API calls', () => {
818
it('gets a list of buffers and switches buffers', async () => {
919
const buffers = await nvim.buffers;

packages/neovim/src/api/Tabpage.test.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
import * as jestMock from 'jest-mock';
22
import expect from 'expect';
3-
import { nvim } from '../testUtil';
3+
import * as testUtil from '../testUtil';
44
import type { Tabpage } from './Tabpage';
55

66
describe('Tabpage API', () => {
7+
let nvim: ReturnType<typeof testUtil.startNvim>[1];
8+
9+
before(async () => {
10+
[, nvim] = testUtil.startNvim();
11+
});
12+
13+
after(() => {
14+
testUtil.stopNvim();
15+
});
16+
717
it('gets the current Tabpage', async () => {
818
const tabpage = await nvim.tabpage;
919
expect(tabpage).toBeInstanceOf(nvim.Tabpage);

packages/neovim/src/api/Window.test.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
import assert from 'node:assert';
22
import expect from 'expect';
3-
import { nvim } from '../testUtil';
3+
import * as testUtil from '../testUtil';
44
import type { Window } from './Window';
55

66
describe('Window API', () => {
7+
let nvim: ReturnType<typeof testUtil.startNvim>[1];
8+
9+
before(async () => {
10+
[, nvim] = testUtil.startNvim();
11+
});
12+
13+
after(() => {
14+
testUtil.stopNvim();
15+
});
16+
717
it('gets the current Window', async () => {
818
const win = await nvim.window;
919
expect(win).toBeInstanceOf(nvim.Window);

packages/neovim/src/attach/attach.test.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,23 @@ import * as jestMock from 'jest-mock';
22
import expect from 'expect';
33
import { attach } from './attach';
44
import { Logger } from '../utils/logger';
5-
import { proc, nvim, startNvim, stopNvim } from '../testUtil';
5+
import * as testUtil from '../testUtil';
66
import { NeovimClient } from '../api/client';
77

88
// global.expect = expect;
99

1010
describe('Nvim API', () => {
11+
let proc: ReturnType<typeof testUtil.startNvim>[0];
12+
let nvim: ReturnType<typeof testUtil.startNvim>[1];
13+
14+
before(async () => {
15+
[proc, nvim] = testUtil.startNvim();
16+
});
17+
18+
after(() => {
19+
testUtil.stopNvim();
20+
});
21+
1122
let requests: { method: string; args: number[] }[];
1223
let notifications: { method: string; args: number[] }[];
1324

@@ -54,7 +65,7 @@ describe('Nvim API', () => {
5465
});
5566

5667
it('console.log NOT monkey-patched if custom logger passed to attach()', async () => {
57-
const [proc2] = startNvim(false);
68+
const [proc2] = testUtil.startNvim(false);
5869
const logged: string[] = [];
5970
let logger2 = {};
6071
const fakeLog = (msg: any) => {
@@ -87,7 +98,7 @@ describe('Nvim API', () => {
8798
// Still alive?
8899
expect(await nvim2.eval('1+1')).toEqual(2);
89100

90-
stopNvim(nvim2);
101+
testUtil.stopNvim(nvim2);
91102
});
92103

93104
it('can send requests and receive response', async () => {

0 commit comments

Comments
 (0)