mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
Fix #144622 using mime text/x-json instead of application/json
This commit is contained in:
@@ -679,7 +679,7 @@ suite('ExtHostTypes', function () {
|
||||
// --- JSON
|
||||
|
||||
item = types.NotebookCellOutputItem.json(1);
|
||||
assert.strictEqual(item.mime, 'application/json');
|
||||
assert.strictEqual(item.mime, 'text/x-json');
|
||||
assert.deepStrictEqual(item.data, new TextEncoder().encode(JSON.stringify(1)));
|
||||
|
||||
item = types.NotebookCellOutputItem.json(1, 'foo/bar');
|
||||
@@ -687,11 +687,11 @@ suite('ExtHostTypes', function () {
|
||||
assert.deepStrictEqual(item.data, new TextEncoder().encode(JSON.stringify(1)));
|
||||
|
||||
item = types.NotebookCellOutputItem.json(true);
|
||||
assert.strictEqual(item.mime, 'application/json');
|
||||
assert.strictEqual(item.mime, 'text/x-json');
|
||||
assert.deepStrictEqual(item.data, new TextEncoder().encode(JSON.stringify(true)));
|
||||
|
||||
item = types.NotebookCellOutputItem.json([true, 1, 'ddd']);
|
||||
assert.strictEqual(item.mime, 'application/json');
|
||||
assert.strictEqual(item.mime, 'text/x-json');
|
||||
assert.deepStrictEqual(item.data, new TextEncoder().encode(JSON.stringify([true, 1, 'ddd'], undefined, '\t')));
|
||||
|
||||
// --- text
|
||||
|
||||
Reference in New Issue
Block a user