Skip to content

Commit 40871a2

Browse files
author
Benjamin Pasero
committed
clean up failing test
1 parent 20521eb commit 40871a2

8 files changed

Lines changed: 9 additions & 76 deletions

File tree

src/vs/base/node/encoding.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export function detectEncodingByBOM(file: string): TPromise<string> {
9595
return stream.readExactlyByFile(file, 3).then(({ buffer, bytesRead }) => detectEncodingByBOMFromBuffer(buffer, bytesRead));
9696
}
9797

98-
const MINIMUM_THRESHOLD = 0.2; // TODO@Ben Decide how much this should be.
98+
const MINIMUM_THRESHOLD = 0.2;
9999
jschardet.Constants.MINIMUM_THRESHOLD = MINIMUM_THRESHOLD;
100100

101101
const IGNORE_ENCODINGS = ['ascii', 'utf-8', 'utf-16', 'utf-32'];

src/vs/base/parts/ipc/test/node/ipc.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ suite('IPC', () => {
2525

2626
test('createChannel', () => {
2727
if (process.env['VSCODE_PID']) {
28-
return undefined; // TODO@Ben find out why test fails when run from within VS Code
28+
return undefined; // this test fails when run from within VS Code
2929
}
3030

3131
const client = createClient();
@@ -42,7 +42,7 @@ suite('IPC', () => {
4242

4343
test('cancellation', () => {
4444
if (process.env['VSCODE_PID']) {
45-
return undefined; // TODO@Ben find out why test fails when run from within VS Code
45+
return undefined; // this test fails when run from within VS Code
4646
}
4747

4848
const client = createClient();
@@ -62,7 +62,7 @@ suite('IPC', () => {
6262

6363
test('events', () => {
6464
if (process.env['VSCODE_PID']) {
65-
return undefined; // TODO@Ben find out why test fails when run from within VS Code
65+
return undefined; // this test fails when run from within VS Code
6666
}
6767

6868
const client = createClient();
@@ -88,7 +88,7 @@ suite('IPC', () => {
8888

8989
test('event dispose', () => {
9090
if (process.env['VSCODE_PID']) {
91-
return undefined; // TODO@Ben find out why test fails when run from within VS Code
91+
return undefined; // this test fails when run from within VS Code
9292
}
9393

9494
const client = createClient();

src/vs/base/test/node/port.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ suite('Ports', () => {
1414
this.timeout(1000 * 10); // higher timeout for this test
1515

1616
if (process.env['VSCODE_PID']) {
17-
return done(); // TODO@Ben find out why test fails when run from within VS Code
17+
return done(); // this test fails when run from within VS Code
1818
}
1919

2020
// get an initial freeport >= 7000

src/vs/base/test/node/processes/processes.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function fork(id: string): cp.ChildProcess {
2727
suite('Processes', () => {
2828
test('buffered sending - simple data', function (done: () => void) {
2929
if (process.env['VSCODE_PID']) {
30-
return done(); // TODO@Ben find out why test fails when run from within VS Code
30+
return done(); // this test fails when run from within VS Code
3131
}
3232

3333
const child = fork('vs/base/test/node/processes/fixtures/fork');

src/vs/code/electron-main/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function setupIPC(accessor: ServicesAccessor): TPromise<Server> {
102102
return connect(environmentService.mainIPCHandle, 'main').then(
103103
client => {
104104

105-
// Tests from CLI require to be the only instance currently (TODO@Ben support multiple instances and output)
105+
// Tests from CLI require to be the only instance currently
106106
if (environmentService.extensionTestsPath && !environmentService.debugExtensionHost.break) {
107107
const msg = 'Running extension tests from the command line is currently only supported if no other instance of Code is running.';
108108
console.error(msg);

src/vs/workbench/electron-browser/shell.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,7 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
516516
collector.addRule(`.monaco-shell { color: ${windowForeground}; }`);
517517
}
518518

519-
// TODO@Ben the workbench background color is not really surfacing anywhere but on Windows
520-
// not setting it will cause many part of the worbench to not use subpixel-antialiasing causing
521-
// these parts to look fuzzy on higher resolution displays.
519+
// We need to set the workbench background color so that on Windows we get subpixel-antialiasing.
522520
let workbenchBackground: string;
523521
switch (theme.type) {
524522
case 'dark':

src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -120,22 +120,6 @@ export class WalkThroughInput extends EditorInput {
120120
}
121121

122122
return this.promise;
123-
124-
// TODO: replicate above?
125-
// return this.promise.then(ref => {
126-
// const model = ref.object;
127-
128-
// if (!(model instanceof ResourceEditorModel)) {
129-
// ref.dispose();
130-
// this.promise = null;
131-
// return TPromise.wrapError(`Unexpected model for ResourceInput: ${this.resource}`); // TODO@Ben eventually also files should be supported, but we guard due to the dangerous dispose of the model in dispose()
132-
// }
133-
134-
// // TODO@Joao this should never happen
135-
// model.onDispose(() => this.dispose());
136-
137-
// return model;
138-
// });
139123
}
140124

141125
matches(otherInput: any): boolean {

src/vs/workbench/services/textfile/test/textFileEditorModel.test.ts

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -228,35 +228,6 @@ suite('Files - TextFileEditorModel', () => {
228228
}, error => onError(error, done));
229229
});
230230

231-
test('Auto Save triggered when model changes', function (done) {
232-
let eventCounter = 0;
233-
const model: TextFileEditorModel = instantiationService.createInstance(TextFileEditorModel, toResource.call(this, '/path/index.txt'), 'utf8');
234-
235-
(<any>model).autoSaveAfterMillies = 10;
236-
(<any>model).autoSaveAfterMilliesEnabled = true;
237-
238-
model.onDidStateChange(e => {
239-
if (e === StateChange.DIRTY || e === StateChange.SAVED) {
240-
eventCounter++;
241-
}
242-
});
243-
244-
model.load().done(() => {
245-
model.textEditorModel.setValue('foo');
246-
247-
return TPromise.timeout(200).then(() => {
248-
assert.ok(!model.isDirty());
249-
assert.equal(eventCounter, 2);
250-
251-
model.dispose();
252-
253-
assert.ok(!accessor.modelService.getModel(model.getResource()));
254-
255-
done();
256-
});
257-
}, error => onError(error, done));
258-
});
259-
260231
test('save() and isDirty() - proper with check for mtimes', function (done) {
261232
const input1 = createFileInput(instantiationService, toResource.call(this, '/path/index_async2.txt'));
262233
const input2 = createFileInput(instantiationService, toResource.call(this, '/path/index_async.txt'));
@@ -375,26 +346,6 @@ suite('Files - TextFileEditorModel', () => {
375346
}, error => onError(error, done));
376347
});
377348

378-
// TODO@Ben unreliable test
379-
// test('Orphaned models - state and event', function (done) {
380-
// const model: TextFileEditorModel = instantiationService.createInstance(TextFileEditorModel, toResource.call(this, '/path/index_async.txt'), 'utf8');
381-
382-
// const unbind = model.onDidStateChange(e => {
383-
// if (e === StateChange.ORPHANED_CHANGE) {
384-
// unbind.dispose();
385-
// done();
386-
// }
387-
// });
388-
389-
// accessor.fileService.fireFileChanges(new FileChangesEvent([{ resource: model.getResource(), type: FileChangeType.DELETED }]));
390-
// return TPromise.timeout(110).then(() => {
391-
// assert.ok(model.hasState(ModelState.ORPHAN));
392-
393-
// accessor.fileService.fireFileChanges(new FileChangesEvent([{ resource: model.getResource(), type: FileChangeType.ADDED }]));
394-
// assert.ok(!model.hasState(ModelState.ORPHAN));
395-
// });
396-
// });
397-
398349
test('SaveSequentializer - pending basics', function (done) {
399350
const sequentializer = new SaveSequentializer();
400351

0 commit comments

Comments
 (0)