@iamsergio/qttest-utils 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/out/qttest.d.ts CHANGED
@@ -22,6 +22,11 @@ export declare class QtTest {
22
22
  linksToQtTestLib(): Promise<boolean> | undefined;
23
23
  isQtTestViaHelp(): Promise<boolean | undefined>;
24
24
  runTest(slotName?: string): Promise<boolean>;
25
+ command(): {
26
+ label: string;
27
+ executablePath: string;
28
+ args: string[];
29
+ };
25
30
  }
26
31
  /**
27
32
  * Represents a single Qt test slot
@@ -33,6 +38,11 @@ export declare class QtTestSlot {
33
38
  get id(): string;
34
39
  get absoluteFilePath(): string;
35
40
  runTest(): Promise<boolean>;
41
+ command(): {
42
+ label: string;
43
+ executablePath: string;
44
+ args: string[];
45
+ };
36
46
  }
37
47
  /**
38
48
  * Represents the list of all QtTest executables in your project
package/out/qttest.js CHANGED
@@ -150,6 +150,9 @@ class QtTest {
150
150
  });
151
151
  });
152
152
  }
153
+ command() {
154
+ return { label: this.label, executablePath: this.filename, args: [] };
155
+ }
153
156
  }
154
157
  exports.QtTest = QtTest;
155
158
  /**
@@ -171,6 +174,9 @@ class QtTestSlot {
171
174
  return this.parentQTest.runTest(this.name);
172
175
  });
173
176
  }
177
+ command() {
178
+ return { label: this.name, executablePath: this.absoluteFilePath, args: [this.name] };
179
+ }
174
180
  }
175
181
  exports.QtTestSlot = QtTestSlot;
176
182
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iamsergio/qttest-utils",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "API for listing QtTest executables from a build directory and which individual test slots each executable contains. Useful for a Text Explorer VSCode extension.",
5
5
  "scripts": {
6
6
  "build": "tsc"
package/src/qttest.ts CHANGED
@@ -144,6 +144,10 @@ export class QtTest {
144
144
  });
145
145
  });
146
146
  }
147
+
148
+ public command(): { label: string, executablePath: string, args: string[] } {
149
+ return { label: this.label, executablePath: this.filename, args: [] };
150
+ }
147
151
  }
148
152
 
149
153
  /**
@@ -171,6 +175,10 @@ export class QtTestSlot {
171
175
  public async runTest(): Promise<boolean> {
172
176
  return this.parentQTest.runTest(this.name);
173
177
  }
178
+
179
+ public command(): { label: string, executablePath: string, args: string[] } {
180
+ return { label: this.name, executablePath: this.absoluteFilePath, args: [this.name] };
181
+ }
174
182
  }
175
183
 
176
184
  /**