Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Commit

Permalink
read from test or cli (#106)
Browse files Browse the repository at this point in the history
* read from test or cli

* check null

* fix

Co-authored-by: Changlong Liu <[email protected]>
  • Loading branch information
changlong-liu and Changlong Liu authored Dec 17, 2020
1 parent bd92ffb commit 5c1906e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ extension.Add("cli-test", async host => {
dumper.dumpCodeModel("test-pre", session.model);

// add test scenario from common settings
const cliCommonSettings = await host.GetValue("test") || await host.GetValue("cli");
if (cliCommonSettings) {
session.model["test-scenario"] = cliCommonSettings['test-scenario'] || cliCommonSettings['test-setup'];
const testCommonSettings = await host.GetValue("test");
const cliCommonSettings = await host.GetValue("cli");
if (testCommonSettings || cliCommonSettings) {
session.model["test-scenario"] = testCommonSettings?.['test-scenario'] || testCommonSettings?.['test-setup'] || cliCommonSettings?.['test-scenario'] || cliCommonSettings?.['test-setup'];
}

dumper.dumpCodeModel("test-post", session.model);
Expand Down

0 comments on commit 5c1906e

Please sign in to comment.