Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoliy Bazko <abazko@redhat.com>
  • Loading branch information
tolusha committed Nov 14, 2019
1 parent 610d721 commit c43c4ca
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion packages/plugin-ext/src/plugin/type-converters.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,18 @@ describe('Type converters:', () => {
// when
const result: theia.Task = Converter.toTask(shellTaskDto);

assert.strictEqual(result.execution instanceof types.ShellExecution, true);

if (result.execution instanceof types.ShellExecution) {
assert.strictEqual(result.execution.commandLine, undefined);

result.execution = {
args: result.execution.args,
options: result.execution.options,
command: result.execution.command
};
}

// then
assert.notEqual(result, undefined);
assert.deepEqual(result, shellPluginTask);
Expand Down Expand Up @@ -285,8 +297,19 @@ describe('Type converters:', () => {
// when
const result: theia.Task = Converter.toTask(customTaskDto);

assert.strictEqual(result.execution instanceof types.ShellExecution, true);

if (result.execution instanceof types.ShellExecution) {
assert.strictEqual(result.execution.commandLine, undefined);

result.execution = {
args: result.execution.args,
options: result.execution.options,
command: result.execution.command
};
}

// then
assert.notEqual(result, undefined);
assert.deepEqual(result, customPluginTask);
});

Expand Down

0 comments on commit c43c4ca

Please sign in to comment.