|
5 | 5 |
|
6 | 6 | import * as vscode from 'vscode'; |
7 | 7 | import { getDocUri, activate, testCompletion, testHover, testDiagnostics, sleep } from './helper'; |
| 8 | +import { Uri } from 'vscode'; |
8 | 9 |
|
9 | 10 | describe('Tests for schema provider feature', () => { |
10 | 11 | const docUri = getDocUri('completion/completion.yaml'); |
@@ -133,23 +134,6 @@ describe('Tests for schema provider feature', () => { |
133 | 134 | } |
134 | 135 | ] |
135 | 136 | }); |
136 | | - }); |
137 | | - |
138 | | - it('Multiple contributors with one throwing an error', async () => { |
139 | | - const client = await activate(docUri); |
140 | | - client._customSchemaContributors = {}; |
141 | | - client.registerContributor(SCHEMA2, onRequestSchema2URI, onRequestSchema2Content); |
142 | | - client.registerContributor("schemathrowingerror", onRequestSchemaURIThrowError, onRequestSchemaContentThrowError); |
143 | | - |
144 | | - await testCompletion(docUri, new vscode.Position(0, 0), { |
145 | | - items: [ |
146 | | - { |
147 | | - label: "apple", |
148 | | - kind: 9, |
149 | | - documentation: "An apple" |
150 | | - } |
151 | | - ] |
152 | | - }); |
153 | 137 | }); |
154 | 138 | }); |
155 | 139 |
|
@@ -177,14 +161,6 @@ function onRequestSchema1URI(resource: string): string | undefined { |
177 | 161 | return undefined; |
178 | 162 | } |
179 | 163 |
|
180 | | -function onRequestSchemaURIThrowError(resource: string): string | undefined { |
181 | | - throw new Error('test what happens when an error is thrown and not caught'); |
182 | | -} |
183 | | - |
184 | | -function onRequestSchemaContentThrowError(schemaUri: string): string | undefined { |
185 | | - throw new Error('test what happens when an error is thrown and not caught'); |
186 | | -} |
187 | | - |
188 | 164 | function onRequestSchema1Content(schemaUri: string): string | undefined { |
189 | 165 | return schemaJSON; |
190 | 166 | } |
|
0 commit comments