mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
extension test for #5649
This commit is contained in:
parent
67cc42c9a7
commit
11eeab9943
|
@ -7,6 +7,27 @@
|
|||
"engines": {
|
||||
"vscode": "*"
|
||||
},
|
||||
"contributes": {
|
||||
"configuration": {
|
||||
"configuration": {
|
||||
"type": "object",
|
||||
"title": "Test Config",
|
||||
"properties": {
|
||||
"farboo.config0": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"farboo.nested.config1": {
|
||||
"type": "number",
|
||||
"default": 42
|
||||
},
|
||||
"farboo.nested.config2": {
|
||||
"type": "string",
|
||||
"default": "Das Pferd frisst kein Reis."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"compile": "node ./node_modules/vscode/bin/compile -watch -p ./",
|
||||
"vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-api-tests ./tsconfig.json",
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
'use strict';
|
||||
|
||||
import * as assert from 'assert';
|
||||
import {workspace, TextDocument, window, Position, Uri, EventEmitter, CancellationTokenSource, Disposable, WorkspaceEdit} from 'vscode';
|
||||
import {workspace, TextDocument, window, Position, Uri, EventEmitter, WorkspaceEdit} from 'vscode';
|
||||
import {createRandomFile, deleteFile, cleanUp, pathEquals} from './utils';
|
||||
import {join, basename} from 'path';
|
||||
import * as fs from 'fs';
|
||||
|
@ -15,6 +15,17 @@ suite('workspace-namespace', () => {
|
|||
|
||||
teardown(cleanUp);
|
||||
|
||||
// test('default configuration', () => {
|
||||
// const config = workspace.getConfiguration('farboo');
|
||||
|
||||
// assert.ok(config.has('config0'));
|
||||
// assert.equal(config.get('config0'), true);
|
||||
// assert.ok(config.has('nested.config1'));
|
||||
// assert.equal(config.get('nested.config1'), 42);
|
||||
// assert.ok(config.has('nested.config2'));
|
||||
// assert.equal(config.get('nested.config2'), 'Das Pferd frisst kein Reis.');
|
||||
// });
|
||||
|
||||
test('textDocuments', () => {
|
||||
assert.ok(Array.isArray(workspace.textDocuments));
|
||||
assert.throws(() => workspace.textDocuments = null);
|
||||
|
|
Loading…
Reference in a new issue