mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-22 06:59:30 -06:00
fix: Correctly parse single --spec globs containing a range (#19789)
This commit is contained in:
@@ -250,7 +250,7 @@ const parseSpecArgv = (pattern) => {
|
||||
}
|
||||
|
||||
if (!hasComma) {
|
||||
return pattern
|
||||
return [pattern]
|
||||
}
|
||||
|
||||
// Get comma rules.
|
||||
|
||||
@@ -177,6 +177,18 @@ describe('lib/util/args', () => {
|
||||
expect(options.spec[0]).to.eq(`${cwd}/cypress/integration/{[!a]*.spec.js,sub1,{sub2,sub3/sub4}}/*.js`)
|
||||
expect(options.spec[1]).to.eq(`${cwd}/cypress/integration/foo.spec.js`)
|
||||
})
|
||||
|
||||
it('should be correctly parsing single glob with range', function () {
|
||||
const options = this.setup('--spec', 'cypress/integration/[a-c]*/**')
|
||||
|
||||
expect(options.spec[0]).to.eq(`${cwd}/cypress/integration/[a-c]*/**`)
|
||||
})
|
||||
|
||||
it('should be correctly parsing single glob with list', function () {
|
||||
const options = this.setup('--spec', 'cypress/integration/{a,b,c}/*.js')
|
||||
|
||||
expect(options.spec[0]).to.eq(`${cwd}/cypress/integration/{a,b,c}/*.js`)
|
||||
})
|
||||
})
|
||||
|
||||
context('--tag', () => {
|
||||
|
||||
Reference in New Issue
Block a user