Skip to content

Commit 9945456

Browse files
committed
fix statement for which path selected
1 parent 5214892 commit 9945456

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/test/testing/testController/utils.unit.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as assert from 'assert';
22
import * as sinon from 'sinon';
33
import * as fs from 'fs';
44
import * as path from 'path';
5-
import * as os from 'os';
65
import { writeTestIdsFile } from '../../../client/testing/testController/common/utils';
76
import { EXTENSION_ROOT_DIR } from '../../../client/constants';
87

@@ -21,11 +20,13 @@ suite('writeTestIdsFile tests', () => {
2120
const testIds = ['test1', 'test2', 'test3'];
2221
const writeFileStub = sandbox.stub(fs.promises, 'writeFile').resolves();
2322

24-
const result = await writeTestIdsFile(testIds);
25-
26-
const tmpDir = os.tmpdir();
23+
// Set up XDG_RUNTIME_DIR
24+
process.env = {
25+
...process.env,
26+
XDG_RUNTIME_DIR: '/xdg/runtime/dir',
27+
};
2728

28-
assert.ok(result.startsWith(tmpDir));
29+
await writeTestIdsFile(testIds);
2930

3031
assert.ok(writeFileStub.calledOnceWith(sinon.match.string, testIds.join('\n')));
3132
});

0 commit comments

Comments
 (0)