@iamsergio/qttest-utils 0.4.4 → 0.4.5

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
@@ -5,6 +5,7 @@
5
5
  export declare class QtTest {
6
6
  readonly filename: string;
7
7
  readonly buildDirPath: string;
8
+ vscodeTestItem: any | undefined;
8
9
  slots: QtTestSlot[] | null;
9
10
  constructor(filename: string, buildDirPath: string);
10
11
  get id(): string;
@@ -35,6 +36,7 @@ export declare class QtTest {
35
36
  export declare class QtTestSlot {
36
37
  name: string;
37
38
  parentQTest: QtTest;
39
+ vscodeTestItem: any | undefined;
38
40
  constructor(name: string, parent: QtTest);
39
41
  get id(): string;
40
42
  get absoluteFilePath(): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iamsergio/qttest-utils",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
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
  "repository": {
6
6
  "type": "git",
package/src/qttest.ts CHANGED
@@ -15,6 +15,9 @@ export class QtTest {
15
15
  readonly filename: string;
16
16
  readonly buildDirPath: string;
17
17
 
18
+ /// Allows vscode extensions to associate with a test item
19
+ vscodeTestItem: any | undefined;
20
+
18
21
  slots: QtTestSlot[] | null = null;
19
22
 
20
23
  constructor(filename: string, buildDirPath: string) {
@@ -44,7 +47,7 @@ export class QtTest {
44
47
  return;
45
48
  }
46
49
 
47
- const child = spawn(this.filename, ["-functions"], {cwd: this.buildDirPath});
50
+ const child = spawn(this.filename, ["-functions"], { cwd: this.buildDirPath });
48
51
 
49
52
  child.stdout.on("data", (chunk) => {
50
53
  output += chunk.toString();
@@ -144,7 +147,7 @@ export class QtTest {
144
147
  }
145
148
 
146
149
  return await new Promise((resolve, reject) => {
147
- let opts = cwd.length > 0 ? {cwd: cwd} : {cwd: this.buildDirPath};
150
+ let opts = cwd.length > 0 ? { cwd: cwd } : { cwd: this.buildDirPath };
148
151
  const child = spawn(this.filename, args, opts);
149
152
  child.stdout.on("data", (chunk) => {
150
153
  // chunk.toString()
@@ -174,6 +177,9 @@ export class QtTestSlot {
174
177
  // The QTest executable this slot belongs to
175
178
  parentQTest: QtTest;
176
179
 
180
+ /// Allows vscode extensions to associate with a test item
181
+ vscodeTestItem: any | undefined;
182
+
177
183
  constructor(name: string, parent: QtTest) {
178
184
  this.name = name;
179
185
  this.parentQTest = parent;