Skip to content

Commit ceff604

Browse files
committed
Use full path for tsserver
1 parent 54bb61f commit ceff604

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

e2e/server-fixture/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ const readline = require('readline');
44

55
class TSServer {
66
constructor() {
7-
const tsserverPath = require.resolve('typescript/lib/tsserver');
7+
const tsserverPath = path.join(__dirname, '..', 'node_modules', 'typescript', 'lib', 'tsserver');
88
const server = fork(tsserverPath, [
99
'--logVerbosity', 'verbose',
1010
'--logFile', path.join(__dirname, 'log.txt')
1111
], {
12-
cwd: path.join(__dirname, '../project-fixture'),
13-
stdio: ['pipe', 'pipe', 'pipe', 'ipc'],
14-
});
12+
cwd: path.join(__dirname, '..', 'project-fixture'),
13+
stdio: ['pipe', 'pipe', 'pipe', 'ipc'],
14+
});
1515
this._exitPromise = new Promise((resolve, reject) => {
1616
server.on('exit', code => resolve(code));
1717
server.on('error', reason => reject(reason));
1818
});
1919
server.stdout.setEncoding('utf-8');
2020
readline.createInterface({
2121
input: server.stdout
22-
}).on('line', line => {
22+
}).on('line', line => {
2323
if (line[0] === '{') {
2424
this.responses.push(JSON.parse(line));
2525
}

0 commit comments

Comments
 (0)