bt-runner 2.0.0-beta.5 → 2.0.0-beta.6

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/dist/generator.js CHANGED
@@ -85,7 +85,7 @@ function writeTestFile(outputPath, iteration, globals) {
85
85
  const globalsString = globals
86
86
  .map((glob) => `if (!window.${glob}) {
87
87
  logs.push(["Required library '${glob}' not loaded. Aborting..."])
88
- done({ failures: 1, logs: logs })
88
+ localDone({ failures: 1, logs: logs })
89
89
  return
90
90
  }`)
91
91
  .join("\n");
@@ -105,22 +105,21 @@ function writeTestFile(outputPath, iteration, globals) {
105
105
  client.waitForElementVisible("#main")
106
106
  client.timeoutsAsyncScript(1500000).executeAsync(
107
107
  (_data, done) => {
108
+ const localDone = typeof _data === "function" ? _data : done
109
+
108
110
  const mocha = window.mocha
109
111
 
110
112
  //add required test librarys in this if statement
111
113
  if (!mocha) {
112
114
  logs.push(["Required library 'mocha' not loaded. Aborting..."])
113
- done({ failures: 1, logs: logs })
115
+ localDone({ failures: 1, logs: logs })
114
116
  return
115
117
  }
116
118
 
117
119
  ${globalsString}
118
-
119
- console.log("function", _data, done)
120
120
 
121
121
  mocha.run(function (failures) {
122
- console.log("mocha", _data, done)
123
- done({ failures: failures, logs: logs })
122
+ localDone({ failures: failures, logs: logs })
124
123
  })
125
124
  },
126
125
  [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-runner",
3
- "version": "2.0.0-beta.5",
3
+ "version": "2.0.0-beta.6",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",