Commit 001edfe4 authored by devjiwonchoi's avatar devjiwonchoi

Address comment

parent 896a6c1c
...@@ -83,7 +83,9 @@ export async function resolveBuildPaths( ...@@ -83,7 +83,9 @@ export async function resolveBuildPaths(
throw new Error(`Pattern "${patterns.join(',')}" did not match any files`) throw new Error(`Pattern "${patterns.join(',')}" did not match any files`)
} }
Log.info(`Pattern "${patterns.join(',')}" did match ${matches.length} files`) Log.info(
`Pattern "${patterns.join(',')}" did match ${matches.length} file(s)`
)
for (const file of matches) { for (const file of matches) {
if (!fs.statSync(path.join(projectDir, file)).isDirectory()) { if (!fs.statSync(path.join(projectDir, file)).isDirectory()) {
......
...@@ -179,7 +179,8 @@ describe('debug-build-paths', () => { ...@@ -179,7 +179,8 @@ describe('debug-build-paths', () => {
expect(buildResult.cliOutput).toContain('○ /about') expect(buildResult.cliOutput).toContain('○ /about')
expect(buildResult.cliOutput).toContain('○ /dashboard') expect(buildResult.cliOutput).toContain('○ /dashboard')
expect(buildResult.cliOutput).toContain('/blog/[slug]') expect(buildResult.cliOutput).toContain('/blog/[slug]')
expect(buildResult.cliOutput).not.toMatch(/[○ƒ] \/with-type-error/) // Leading whitespace since the pattern "!app/with-type-error/**" is in cliOutput and fails the test.
expect(buildResult.cliOutput).not.toContain(' /with-type-error')
}) })
it('should exclude dynamic route paths with negation', async () => { it('should exclude dynamic route paths with negation', async () => {
...@@ -210,7 +211,8 @@ describe('debug-build-paths', () => { ...@@ -210,7 +211,8 @@ describe('debug-build-paths', () => {
expect(buildResult.cliOutput).toContain('Route (app)') expect(buildResult.cliOutput).toContain('Route (app)')
expect(buildResult.cliOutput).toContain('○ /') expect(buildResult.cliOutput).toContain('○ /')
expect(buildResult.cliOutput).toContain('○ /about') expect(buildResult.cliOutput).toContain('○ /about')
expect(buildResult.cliOutput).not.toMatch(/[○ƒ] \/with-type-error/) // Leading whitespace since the pattern "!app/with-type-error/**" is in cliOutput and fails the test.
expect(buildResult.cliOutput).not.toContain(' /with-type-error')
expect(buildResult.cliOutput).not.toContain('○ /dashboard') expect(buildResult.cliOutput).not.toContain('○ /dashboard')
}) })
...@@ -225,7 +227,8 @@ describe('debug-build-paths', () => { ...@@ -225,7 +227,8 @@ describe('debug-build-paths', () => {
expect(buildResult.cliOutput).toContain('○ /') expect(buildResult.cliOutput).toContain('○ /')
expect(buildResult.cliOutput).toContain('○ /about') expect(buildResult.cliOutput).toContain('○ /about')
expect(buildResult.cliOutput).toContain('○ /foo') expect(buildResult.cliOutput).toContain('○ /foo')
expect(buildResult.cliOutput).not.toMatch(/[○ƒ] \/with-type-error/) // Leading whitespace since the pattern "!app/with-type-error/**" is in cliOutput and fails the test.
expect(buildResult.cliOutput).not.toContain(' /with-type-error')
}) })
it('should build routes inside route groups', async () => { it('should build routes inside route groups', async () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment