The specPattern configuration option is now invalid when set from the root of the config object in Cypress version 10.0.0.

It is now configured separately as a testing type property: e2e.specPattern and component.specPattern

{
  e2e: {
    specPattern: '...',
  },
  component: {
    specPattern: '...',
  },
}

https://on.cypress.io/migration-guide