mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 06:51:53 +01:00
Fixes #43595
This commit is contained in:
@@ -76,17 +76,11 @@ export class IssueReporter extends Disposable {
|
||||
|
||||
this.issueReporterModel = new IssueReporterModel({
|
||||
issueType: configuration.data.issueType || IssueType.Bug,
|
||||
includeSystemInfo: true,
|
||||
includeWorkspaceInfo: true,
|
||||
includeProcessInfo: true,
|
||||
includeSearchedExtensions: true,
|
||||
includeSettingsSearchDetails: true,
|
||||
versionInfo: {
|
||||
vscodeVersion: `${pkg.name} ${pkg.version} (${product.commit || 'Commit unknown'}, ${product.date || 'Date unknown'})`,
|
||||
os: `${os.type()} ${os.arch()} ${os.release()}`
|
||||
},
|
||||
extensionsDisabled: this.environmentService.disableExtensions,
|
||||
reprosWithoutExtensions: false
|
||||
});
|
||||
|
||||
this.features = configuration.features;
|
||||
|
||||
@@ -38,7 +38,17 @@ export class IssueReporterModel {
|
||||
private _data: IssueReporterData;
|
||||
|
||||
constructor(initialData?: IssueReporterData) {
|
||||
this._data = initialData || {};
|
||||
const defaultData = {
|
||||
includeSystemInfo: true,
|
||||
includeWorkspaceInfo: true,
|
||||
includeProcessInfo: true,
|
||||
includeExtensions: true,
|
||||
includeSearchedExtensions: true,
|
||||
includeSettingsSearchDetails: true,
|
||||
reprosWithoutExtensions: false
|
||||
};
|
||||
|
||||
this._data = initialData ? assign(defaultData, initialData) : defaultData;
|
||||
}
|
||||
|
||||
getData(): IssueReporterData {
|
||||
|
||||
@@ -10,7 +10,20 @@ import { IssueReporterModel } from 'vs/code/electron-browser/issue/issueReporter
|
||||
|
||||
suite('IssueReporter', () => {
|
||||
|
||||
test('serializes model', () => {
|
||||
test('sets defaults to include all data', () => {
|
||||
const issueReporterModel = new IssueReporterModel();
|
||||
assert.deepEqual(issueReporterModel.getData(), {
|
||||
includeSystemInfo: true,
|
||||
includeWorkspaceInfo: true,
|
||||
includeProcessInfo: true,
|
||||
includeExtensions: true,
|
||||
includeSearchedExtensions: true,
|
||||
includeSettingsSearchDetails: true,
|
||||
reprosWithoutExtensions: false
|
||||
});
|
||||
});
|
||||
|
||||
test('serializes model skeleton when no data is provided', () => {
|
||||
const issueReporterModel = new IssueReporterModel();
|
||||
assert.equal(issueReporterModel.serialize(),
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user