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 +5 -6
- package/package.json +1 -1
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
|
-
|
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
|
-
|
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
|
-
|
123
|
-
done({ failures: failures, logs: logs })
|
122
|
+
localDone({ failures: failures, logs: logs })
|
124
123
|
})
|
125
124
|
},
|
126
125
|
[],
|