codeceptjs 3.7.0-beta.17 → 3.7.0-beta.18
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/lib/command/check.js +8 -7
- package/lib/plugin/retryTo.js +1 -1
- package/lib/plugin/tryTo.js +1 -1
- package/package.json +1 -1
package/lib/command/check.js
CHANGED
|
@@ -131,19 +131,20 @@ module.exports = async function (options) {
|
|
|
131
131
|
if (Object.keys(helpers).length) {
|
|
132
132
|
const suite = container.mocha().suite
|
|
133
133
|
const test = createTest('test', () => {})
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
checks.setup = true
|
|
135
|
+
for (const helper of Object.values(helpers)) {
|
|
136
|
+
try {
|
|
136
137
|
if (helper._beforeSuite) await helper._beforeSuite(suite)
|
|
137
138
|
if (helper._before) await helper._before(test)
|
|
138
139
|
if (helper._passed) await helper._passed(test)
|
|
139
140
|
if (helper._after) await helper._after(test)
|
|
140
141
|
if (helper._finishTest) await helper._finishTest(suite)
|
|
141
|
-
if (helper._afterSuite) await helper._afterSuite(suite)
|
|
142
|
+
if (helper._afterSuite) await helper._afterSuite(suite)
|
|
143
|
+
} catch (err) {
|
|
144
|
+
err.message = `${helper.constructor.name} helper: ${err.message}`
|
|
145
|
+
if (checks.setup) err.message = `${err.message}\n\n${checks.setup?.message}`
|
|
146
|
+
checks.setup = err
|
|
142
147
|
}
|
|
143
|
-
checks.setup = true
|
|
144
|
-
} catch (err) {
|
|
145
|
-
err.message = `${helper.constructor.name} helper failed: ${err.message}`
|
|
146
|
-
checks.setup = err
|
|
147
148
|
}
|
|
148
149
|
}
|
|
149
150
|
|
package/lib/plugin/retryTo.js
CHANGED
|
@@ -6,7 +6,7 @@ const defaultConfig = {
|
|
|
6
6
|
|
|
7
7
|
module.exports = function (config) {
|
|
8
8
|
config = Object.assign(defaultConfig, config)
|
|
9
|
-
console.log(`Deprecation Warning: 'retryTo' has been moved to the 'codeceptjs/effects' module
|
|
9
|
+
console.log(`Deprecation Warning: 'retryTo' has been moved to the 'codeceptjs/effects' module. Disable retryTo plugin to remove this warning.`)
|
|
10
10
|
|
|
11
11
|
if (config.registerGlobal) {
|
|
12
12
|
global.retryTo = retryTo
|
package/lib/plugin/tryTo.js
CHANGED
|
@@ -6,7 +6,7 @@ const defaultConfig = {
|
|
|
6
6
|
|
|
7
7
|
module.exports = function (config) {
|
|
8
8
|
config = Object.assign(defaultConfig, config)
|
|
9
|
-
console.log(`Deprecation Warning: 'tryTo' has been moved to the 'codeceptjs/effects' module
|
|
9
|
+
console.log(`Deprecation Warning: 'tryTo' has been moved to the 'codeceptjs/effects' module. Disable tryTo plugin to remove this warning.`)
|
|
10
10
|
|
|
11
11
|
if (config.registerGlobal) {
|
|
12
12
|
global.tryTo = tryTo
|