Skip to content

Commit

Permalink
Merge pull request #197 from mgara/master
Browse files Browse the repository at this point in the history
fix: fixed glob expression
  • Loading branch information
GiovanniCardamone authored Dec 2, 2022
2 parents e2d2044 + 764a8df commit 4697a46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export default fastifyPlugin<FastifyAutoroutesOptions>(
// glob returns ../../, but windows returns ..\..\
dirPath = path.normalize(dirPath).replace(/\\/g, '/')

const routes = await glob(`${dirPath}/**/[!._]*[!.test].{ts,js}`)
const routes = await glob(`${dirPath}/**/[!._]!(*.test).{ts,js}`)
const routesModules: Record<string, StrictResource> = {}

// console.log({ routes })
Expand Down

0 comments on commit 4697a46

Please sign in to comment.