()
| 124 | |
| 125 | |
| 126 | async docsExternalHelpers() { |
| 127 | // generate documentation for helpers outside of main repo |
| 128 | console.log('Building @codecepjs/detox helper docs') |
| 129 | let helper = 'Detox' |
| 130 | replaceInFile(`node_modules/@codeceptjs/detox-helper/${helper}.js`, cfg => { |
| 131 | cfg.replace(/CodeceptJS.LocatorOrString/g, 'string | object') |
| 132 | cfg.replace(/LocatorOrString/g, 'string | object') |
| 133 | }) |
| 134 | await npx(`documentation build node_modules/@codeceptjs/detox-helper/${helper}.js -o ${helperMarkDownFile(helper)} ${documentjsCliArgs}`) |
| 135 | |
| 136 | await writeToFile(helperMarkDownFile(helper), cfg => { |
| 137 | cfg.line(`---\npermalink: /helpers/${helper}\nsidebar: auto\ntitle: ${helper}\n---\n\n# ${helper}\n\n`) |
| 138 | cfg.textFromFile(helperMarkDownFile(helper)) |
| 139 | }) |
| 140 | |
| 141 | replaceInFile(`node_modules/@codeceptjs/detox-helper/${helper}.js`, cfg => { |
| 142 | cfg.replace(/string \| object/g, 'CodeceptJS.LocatorOrString') |
| 143 | cfg.replace(/string \| object/g, 'LocatorOrString') |
| 144 | }) |
| 145 | |
| 146 | console.log('Building @codeceptjs/mock-request') |
| 147 | helper = 'MockRequest' |
| 148 | replaceInFile('node_modules/@codeceptjs/mock-request/index.js', cfg => { |
| 149 | cfg.replace(/CodeceptJS.LocatorOrString/g, 'string | object') |
| 150 | cfg.replace(/LocatorOrString/g, 'string | object') |
| 151 | }) |
| 152 | await npx(`documentation build node_modules/@codeceptjs/mock-request/index.js -o ${helperMarkDownFile(helper)} ${documentjsCliArgs}`) |
| 153 | |
| 154 | await writeToFile(helperMarkDownFile(helper), cfg => { |
| 155 | cfg.line(`---\npermalink: /helpers/${helper}\nsidebar: auto\ntitle: ${helper}\n---\n\n# ${helper}\n\n`) |
| 156 | cfg.textFromFile(helperMarkDownFile(helper)) |
| 157 | }) |
| 158 | |
| 159 | replaceInFile('node_modules/@codeceptjs/mock-request/index.js', cfg => { |
| 160 | cfg.replace(/string \| object/g, 'CodeceptJS.LocatorOrString') |
| 161 | cfg.replace(/string \| object/g, 'LocatorOrString') |
| 162 | }) |
| 163 | }, |
| 164 | |
| 165 | async docsExternalPlugins() { |
| 166 | // generate documentation for helpers outside of main repo |
nothing calls this directly
no test coverage detected