(captured, dir)
| 93 | } |
| 94 | |
| 95 | export function artifactsToFileUrls(captured, dir) { |
| 96 | const out = {} |
| 97 | if (captured.url) out.url = captured.url |
| 98 | if (captured.screenshot) out.screenshot = fileToUrl(dir, captured.screenshot) |
| 99 | if (captured.html) out.html = fileToUrl(dir, captured.html) |
| 100 | if (captured.aria) out.aria = fileToUrl(dir, captured.aria) |
| 101 | if (captured.console) out.console = fileToUrl(dir, captured.console) |
| 102 | if (captured.storage) out.storage = fileToUrl(dir, captured.storage) |
| 103 | if (typeof captured.consoleCount === 'number') out.consoleCount = captured.consoleCount |
| 104 | if (typeof captured.cookieCount === 'number') out.cookieCount = captured.cookieCount |
| 105 | if (typeof captured.localStorageCount === 'number') out.localStorageCount = captured.localStorageCount |
| 106 | return out |
| 107 | } |
| 108 | |
| 109 | // --------------------------------------------------------------------------- |
| 110 | // Snapshot capture (HTML / ARIA / screenshot / console / storage) |
no test coverage detected