File tree Expand file tree Collapse file tree 2 files changed +12
-32
lines changed Expand file tree Collapse file tree 2 files changed +12
-32
lines changed Original file line number Diff line number Diff line change 11const { retryTo } = require ( '../effects' )
22
3- module . exports = function ( config ) {
4- console . log ( `
5- Deprecation Warning: 'retryTo' has been moved to the effects module.
6- You should update your tests to use it as follows:
7-
8- \`\`\`javascript
9- const { retryTo } = require('codeceptjs/effects');
10-
11- // Example: Retry these steps 5 times before failing
12- await retryTo((tryNum) => {
13- I.switchTo('#editor frame');
14- I.click('Open');
15- I.see('Opened');
16- }, 5);
17- \`\`\`
3+ const defaultConfig = {
4+ registerGlobal : true ,
5+ }
186
19- For more details, refer to the documentation.
20- ` )
7+ module . exports = function ( config ) {
8+ config = Object . assign ( defaultConfig , config )
9+ console . log ( `Deprecation Warning: 'retryTo' has been moved to the 'codeceptjs/effects' module` )
2110
2211 if ( config . registerGlobal ) {
2312 global . retryTo = retryTo
Original file line number Diff line number Diff line change 11const { tryTo } = require ( '../effects' )
22
3- module . exports = function ( config ) {
4- console . log ( `
5- Deprecated Warning: 'tryTo' has been moved to the effects module.
6- You should update your tests to use it as follows:
7-
8- \`\`\`javascript
9- const { tryTo } = require('codeceptjs/effects');
10-
11- // Example: failed step won't fail a test but will return true/false
12- await tryTo(() => {
13- I.switchTo('#editor frame');
14- });
15- \`\`\`
3+ const defaultConfig = {
4+ registerGlobal : true ,
5+ }
166
17- For more details, refer to the documentation.
18- ` )
7+ module . exports = function ( config ) {
8+ config = Object . assign ( defaultConfig , config )
9+ console . log ( `Deprecation Warning: 'tryTo' has been moved to the 'codeceptjs/effects' module` )
1910
2011 if ( config . registerGlobal ) {
2112 global . tryTo = tryTo
You can’t perform that action at this time.
0 commit comments