Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7da0e08

Browse files
committed
breaking - changes to testRunner.setup
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parenta0daa57 commit7da0e08

File tree

8 files changed

+32
-35
lines changed

8 files changed

+32
-35
lines changed

‎src/schema/skeleton.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ export default {
5252
description:"An optional folder for the test runner",
5353
examples:["coderoad"],
5454
},
55-
setup:{
56-
$ref:"#/definitions/setup_action_without_commits",
57-
description:
58-
"Setup actions or commands used for setting up the test runner on tutorial launch",
59-
},
6055
},
6156
required:["command","args"],
6257
},
58+
setup:{
59+
$ref:"#/definitions/setup_action_without_commits",
60+
description:
61+
"Setup actions or commands used for setting up the test runner on tutorial launch",
62+
},
6363
repo:{
6464
type:"object",
6565
description:"The repo holding the git commits for the tutorial",

‎src/schema/tutorial.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ export default {
7171
description:"An optional folder for the test runner",
7272
examples:["coderoad"],
7373
},
74-
setup:{
75-
$ref:"#/definitions/setup_action",
76-
description:
77-
"Setup commits or commands used for setting up the test runner on tutorial launch",
78-
},
7974
},
8075
required:["command","args"],
8176
},
77+
setup:{
78+
$ref:"#/definitions/setup_action",
79+
description:
80+
"Setup commits or commands used for setting up the test runner on tutorial launch",
81+
},
8282
repo:{
8383
type:"object",
8484
description:"The repo holding the git commits for the tutorial",

‎src/utils/parse.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ export function parse(params: ParseParams): any {
153153
// add init commits
154154
if(params.commits.INIT&&params.commits.INIT.length){
155155
//@ts-ignore
156-
parsed.config.testRunner.setup={
157-
...(parsed.config?.testRunner?.setup||{}),
156+
parsed.config.setup={
157+
...(parsed.config?.setup||{}),
158158
commits:params.commits.INIT,
159159
};
160160
}

‎src/validate.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,10 @@ async function validate(args: string[]) {
7474
awaitcherryPick(commits.INIT);
7575

7676
// run commands
77-
if(skeleton.config?.testRunner?.setup?.commands){
77+
if(skeleton.config?.setup?.commands){
7878
console.info("-- Running commands...");
7979

80-
awaitrunCommands(
81-
skeleton.config?.testRunner?.setup?.commands,
82-
// add optional setup directory
83-
skeleton.config?.testRunner?.directory
84-
);
80+
awaitrunCommands(skeleton.config?.setup?.commands);
8581
}
8682
}
8783

‎tests/parse.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -987,9 +987,9 @@ Description.
987987
tap:"--reporter=mocha-tap-reporter",
988988
},
989989
directory:"coderoad",
990-
setup:{
991-
commands:[],
992-
},
990+
},
991+
setup:{
992+
commands:[],
993993
},
994994
appVersions:{
995995
vscode:">=0.7.0",
@@ -1026,9 +1026,9 @@ Description.
10261026
tap:"--reporter=mocha-tap-reporter",
10271027
},
10281028
directory:"coderoad",
1029-
setup:{
1030-
commands:[],
1031-
},
1029+
},
1030+
setup:{
1031+
commands:[],
10321032
},
10331033
repo:{
10341034
uri:"https://path.to/repo",
@@ -1101,9 +1101,9 @@ Description.
11011101
tap:"--reporter=mocha-tap-reporter",
11021102
},
11031103
directory:"coderoad",
1104-
setup:{
1105-
commits:["abcdef1","123456789"],
1106-
},
1104+
},
1105+
setup:{
1106+
commits:["abcdef1","123456789"],
11071107
},
11081108
repo:{
11091109
uri:"https://path.to/repo",

‎tests/skeleton.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ const validJson = {
88
config:{
99
testRunner:{
1010
directory:"coderoad",
11-
setup:{
12-
commands:[],
13-
},
11+
1412
args:{
1513
filter:"--grep",
1614
tap:"--reporter=mocha-tap-reporter",
1715
},
1816
command:"./node_modules/.bin/mocha",
1917
},
18+
setup:{
19+
commands:[],
20+
},
2021
repo:{
2122
uri:"http://github.com/somePath/toRepo.git",
2223
branch:"codeBranch",

‎tests/tutorial.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ const validJson: Partial<T.Tutorial> = {
1313
tap:"tap",
1414
},
1515
directory:"coderoad",
16-
setup:{
17-
commits:["abcdef1"],
18-
commands:["npm install"],
19-
},
16+
},
17+
setup:{
18+
commits:["abcdef1"],
19+
commands:["npm install"],
2020
},
2121
repo:{
2222
uri:"https://github.com/some-repo.git",

‎typings/tutorial.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export type TutorialConfig = {
1010
repo:TutorialRepo;
1111
dependencies?:TutorialDependency[];
1212
reset?:ConfigReset;
13+
setup?:StepActions;
1314
};
1415

1516
/** Logical groupings of tasks */
@@ -69,7 +70,6 @@ export interface TestRunnerConfig {
6970
command:string;
7071
args:TestRunnerArgs;
7172
directory?:string;
72-
setup?:StepActions;
7373
}
7474

7575
exportinterfaceTutorialRepo{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp