Skip to content

Commit

Permalink
test: normalize-asset-prefix should return url if is url
Browse files Browse the repository at this point in the history
  • Loading branch information
devjiwonchoi committed Aug 6, 2024
1 parent c721b8c commit 7b64dc7
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/next/src/shared/lib/normalized-asset-prefix.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,9 @@ describe('normalizedAssetPrefix', () => {
expect(normalizedAssetPrefix('path/to/asset')).toBe('/path/to/asset')
})

it('should return a URL without protocol when assetPrefix is a URL', () => {
// TODO: this is for comparison, remove this before PR merge
expect(normalizedAssetPrefix('https://example.com/path/to/asset')).not.toBe(
'/https://example.com/path/to/asset'
)

it('should return the URL when assetPrefix is a URL', () => {
expect(normalizedAssetPrefix('https://example.com/path/to/asset')).toBe(
'example.com/path/to/asset'
'https://example.com/path/to/asset'
)
})
})

0 comments on commit 7b64dc7

Please sign in to comment.