You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: agent/interface.js
+16-1Lines changed: 16 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -51,12 +51,27 @@ function createCommandDefinitions(agent) {
51
51
summary: Flags.string({
52
52
description: "Specify output file for summarize results",
53
53
}),
54
+
prerun: Flags.string({
55
+
description: "File to run before the main test file. Can be the name of a file in the lifecycle folder, or an absolute path",
56
+
default: "prerun",
57
+
}),
58
+
postrun: Flags.string({
59
+
description:
60
+
"File to after before the main test file. This will run regardless of if the test passes. can be the name of a file in the lifecycle folder, or an absolute path",
61
+
default: "postrun",
62
+
}),
63
+
provision: Flags.string({
64
+
description:
65
+
"File to run when a new sandbox is provisioned. Can be the name of a file in the lifecycle folder, or an absolute path",
66
+
default: "provision",
67
+
}),
54
68
},
55
69
handler: async(args,flags)=>{
56
70
// Use --path flag if provided, otherwise fall back to args.file
57
71
constfile=normalizeFilePath(args.file);
58
72
59
-
awaitagent.runLifecycle("prerun");
73
+
awaitagent.runLifecycle(flags.prerun);
74
+
60
75
// When run() is called through run.js CLI command, shouldExit should be true
0 commit comments