File tree Expand file tree Collapse file tree 8 files changed +32
-35
lines changed Expand file tree Collapse file tree 8 files changed +32
-35
lines changed Original file line number Diff line number Diff 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" ,
Original file line number Diff line number Diff 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" ,
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change @@ -74,14 +74,10 @@ async function validate(args: string[]) {
7474 await cherryPick ( 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- await runCommands (
81- skeleton . config ?. testRunner ?. setup ?. commands ,
82- // add optional setup directory
83- skeleton . config ?. testRunner ?. directory
84- ) ;
80+ await runCommands ( skeleton . config ?. setup ?. commands ) ;
8581 }
8682 }
8783
Original file line number Diff line number Diff 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" ,
Original file line number Diff line number Diff 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" ,
Original file line number Diff line number Diff 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" ,
Original file line number Diff line number Diff 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
7575export interface TutorialRepo {
You can’t perform that action at this time.
0 commit comments