mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-11 09:40:11 -06:00
test: updating path separator for mochaEvents (#28265)
This commit is contained in:
@@ -85,6 +85,7 @@ windowsWorkflowFilters: &windows-workflow-filters
|
||||
- equal: [ 'chore/update_webpack_deps_to_latest_webpack4_compat', << pipeline.git.branch >> ]
|
||||
- equal: [ 'lerna-optimize-tasks', << pipeline.git.branch >> ]
|
||||
- equal: [ 'em/shallow-checkout', << pipeline.git.branch >> ]
|
||||
- equal: [ 'mschile/mochaEvents_win_sep', << pipeline.git.branch >> ]
|
||||
- matches:
|
||||
pattern: /^release\/\d+\.\d+\.\d+$/
|
||||
value: << pipeline.git.branch >>
|
||||
|
||||
@@ -204,5 +204,8 @@ function sanitizeMochaEvents (args: CypressInCypressMochaEvent[]) {
|
||||
}
|
||||
|
||||
function getCallerFilename () {
|
||||
return (new Error()).stack!.split('\n')[1].split('/').slice(-1)[0].split(':')[0]
|
||||
const line = (new Error()).stack!.split('\n')[1]
|
||||
const pathSep = line.includes('\\') ? '\\' : '/'
|
||||
|
||||
return line.split(pathSep).slice(-1)[0].split(':')[0]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user