提交 ea048d2f 编写于 作者: R Rachel Macfarlane

Fixes #43595

上级 8f7f517f
......@@ -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(),
`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册