forked from redhat-developer/vscode-tekton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtkn.int.ts
45 lines (36 loc) · 1.37 KB
/
tkn.int.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*-----------------------------------------------------------------------------------------------
* Copyright (c) Red Hat, Inc. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*-----------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
import * as tkn from '../src/tkn';
import * as assert from 'assert';
import * as sinon from 'sinon';
import { TestItem } from './tekton/testTektonitem';
import { Pipeline } from '../src/tekton/pipeline';
import { ContextType } from '../src/context-type';
suite('tkn integration', () => {
const tk: tkn.Tkn = tkn.tkn;
const pipelineItem = new TestItem(null, 'pipeline', ContextType.PIPELINE);
const sb = sinon.createSandbox();
setup(() => {
sb.stub(vscode.window, 'showInformationMessage').resolves('Download and install');
});
teardown(() => {
sb.restore();
});
suite('explorer', () => {
test('getPipelines()', async () => {
const pipelines = await tk.getPipelines(pipelineItem);
assert.ok(pipelines.length > 0);
});
test('getPipelines()', async () => {
const pipelines = await tk.getPipelines(pipelineItem);
assert.ok(pipelines.length > 0);
});
test('about()', async () => {
await Pipeline.about();
assert.ok(true);
});
});
});