Skip to content

Commit 8927005

Browse files
sudhirvermadgolovin
authored andcommitted
increase unittest code coverage for component.ts
1 parent c687ea9 commit 8927005

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

test/openshift/component.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,17 @@ suite('OpenShift/Component', () => {
247247
expect(result).equals('There is no git repository at provided URL.');
248248
});
249249

250+
test('shows error message when invalid URL provided', async () => {
251+
let result: string | Thenable<string>;
252+
inputStub.onFirstCall().callsFake(async (options?: vscode.InputBoxOptions, token?: vscode.CancellationToken): Promise<string> => {
253+
result = await options.validateInput('github');
254+
return Promise.resolve('github');
255+
});
256+
257+
await Component.create(appItem);
258+
expect(result).equals('Invalid URL provided');
259+
});
260+
250261
test('shows error message for empty git repository url', async () => {
251262
let result: string | Thenable<string>;
252263
inputStub.onFirstCall().callsFake(async (options?: vscode.InputBoxOptions, token?: vscode.CancellationToken): Promise<string> => {

0 commit comments

Comments
 (0)