(urlArg, pathArg)
| 305 | } |
| 306 | |
| 307 | async checkFileExtension (urlArg, pathArg) { |
| 308 | try { |
| 309 | const { path: existingPath } = await this.resourceMapper.mapUrlToFile({ url: urlArg }) |
| 310 | if (pathArg !== existingPath) { |
| 311 | try { |
| 312 | await withLock(existingPath, () => promisify(fs.unlink)(existingPath)) |
| 313 | } catch (err) { throw error(err, 'Failed to delete resource') } |
| 314 | } |
| 315 | } catch (err) { } |
| 316 | } |
| 317 | |
| 318 | /** |
| 319 | * This function is used to make sure a resource or container which contains |
no test coverage detected