當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript IssueReporterModel.serialize方法代碼示例

本文整理匯總了TypeScript中vs/code/electron-browser/issue/issueReporterModel.IssueReporterModel.serialize方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript IssueReporterModel.serialize方法的具體用法?TypeScript IssueReporterModel.serialize怎麽用?TypeScript IssueReporterModel.serialize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在vs/code/electron-browser/issue/issueReporterModel.IssueReporterModel的用法示例。


在下文中一共展示了IssueReporterModel.serialize方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: test

	test('serializes GPU information when data is provided', () => {
		const issueReporterModel = new IssueReporterModel({
			issueType: 0,
			systemInfo: {
				'GPU Status': {
					'2d_canvas': 'enabled',
					'checker_imaging': 'disabled_off'
				}
			}
		});
		assert.equal(issueReporterModel.serialize(),
			`
Issue Type: <b>Bug</b>

undefined

VS Code version: undefined
OS version: undefined

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|GPU Status|2d_canvas: enabled<br>checker_imaging: disabled_off|

</details>Extensions: none
<!-- generated by issue reporter -->`);
	});
開發者ID:AllureFer,項目名稱:vscode,代碼行數:29,代碼來源:testReporterModel.test.ts

示例2: test

	test('serializes remote information when data is provided', () => {
		const issueReporterModel = new IssueReporterModel({
			issueType: 0,
			systemInfo: {
				os: 'Darwin',
				cpus: 'Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2800)',
				memory: '16.00GB',
				vmHint: '0%',
				processArgs: '',
				screenReader: 'no',
				gpuStatus: {
					'2d_canvas': 'enabled',
					'checker_imaging': 'disabled_off'
				},
				remoteData: [
					{
						hostName: 'SSH: Pineapple',
						machineInfo: {
							os: 'Linux x64 4.18.0',
							cpus: 'Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz (2 x 2294)',
							memory: '8GB',
							vmHint: '100%'
						}
					}
				]
			}
		});
		assert.equal(issueReporterModel.serialize(),
			`
Issue Type: <b>Bug</b>

undefined

VS Code version: undefined
OS version: undefined
Remote OS version: Linux x64 4.18.0

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2800)|
|GPU Status|2d_canvas: enabled<br>checker_imaging: disabled_off|
|Load (avg)|undefined|
|Memory (System)|16.00GB|
|Process Argv||
|Screen Reader|no|
|VM|0%|

|Item|Value|
|---|---|
|Remote|SSH: Pineapple|
|OS|Linux x64 4.18.0|
|CPUs|Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz (2 x 2294)|
|Memory (System)|8GB|
|VM|100%|
</details>Extensions: none
<!-- generated by issue reporter -->`);
	});
開發者ID:PKRoma,項目名稱:vscode,代碼行數:60,代碼來源:testReporterModel.test.ts

示例3: test

	test('serializes model', () => {
		const issueReporterModel = new IssueReporterModel();
		assert.equal(issueReporterModel.serialize(),
			`
### Issue Type
Feature Request

### Description

undefined

### VS Code Info

VS Code version: undefined
OS version: undefined

`);
	});
開發者ID:igolskyi,項目名稱:vscode,代碼行數:18,代碼來源:testReporterModel.test.ts


注:本文中的vs/code/electron-browser/issue/issueReporterModel.IssueReporterModel.serialize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。