@wdio/browserstack-service 8.5.7 → 8.5.9

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.
@@ -43,28 +43,28 @@ export default class InsightsHandler {
43
43
  }
44
44
  }
45
45
  async beforeHook(test, context) {
46
- const fullTitle = `${test.parent} - ${test.title}`;
47
- const hookId = uuidv4();
48
- this._tests[fullTitle] = {
49
- uuid: hookId,
50
- startedAt: (new Date()).toISOString()
51
- };
52
- this.attachHookData(context, hookId);
53
46
  if (this._framework === 'mocha') {
47
+ const fullTitle = `${test.parent} - ${test.title}`;
48
+ const hookId = uuidv4();
49
+ this._tests[fullTitle] = {
50
+ uuid: hookId,
51
+ startedAt: (new Date()).toISOString()
52
+ };
53
+ this.attachHookData(context, hookId);
54
54
  await this.sendTestRunEvent(test, 'HookRunStarted');
55
55
  }
56
56
  }
57
57
  async afterHook(test, result) {
58
- const fullTitle = getUniqueIdentifier(test);
59
- if (this._tests[fullTitle]) {
60
- this._tests[fullTitle].finishedAt = (new Date()).toISOString();
61
- }
62
- else {
63
- this._tests[fullTitle] = {
64
- finishedAt: (new Date()).toISOString()
65
- };
66
- }
67
58
  if (this._framework === 'mocha') {
59
+ const fullTitle = getUniqueIdentifier(test);
60
+ if (this._tests[fullTitle]) {
61
+ this._tests[fullTitle].finishedAt = (new Date()).toISOString();
62
+ }
63
+ else {
64
+ this._tests[fullTitle] = {
65
+ finishedAt: (new Date()).toISOString()
66
+ };
67
+ }
68
68
  await this.sendTestRunEvent(test, 'HookRunFinished', result);
69
69
  }
70
70
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/browserstack-service",
3
- "version": "8.5.7",
3
+ "version": "8.5.9",
4
4
  "description": "WebdriverIO service for better Browserstack integration",
5
5
  "author": "Adam Bjerstedt <abjerstedt@gmail.com>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-browserstack-service",
@@ -37,7 +37,7 @@
37
37
  "gitconfiglocal": "^2.1.0",
38
38
  "got": "^12.1.0",
39
39
  "uuid": "^8.3.2",
40
- "webdriverio": "8.5.7"
40
+ "webdriverio": "8.5.9"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@wdio/cli": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
@@ -48,5 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "gitHead": "b8b610be11417ada5809f75266f0462abeb5df79"
51
+ "gitHead": "9246f2255abc4340b9d88d49ee312180c0615fad"
52
52
  }