MCPcopy Index your code
hub / github.com/github/docs / getNextStaticAsset

Function getNextStaticAsset

tests/rendering/static-assets.js:9–14  ·  view source on GitHub ↗
(directory)

Source from the content-addressed store, hash-verified

7import { checkCachingHeaders } from '../helpers/caching-headers.js'
8
9function getNextStaticAsset(directory) {
10 const root = path.join('.next', 'static', directory)
11 const files = fs.readdirSync(root)
12 if (!files.length) throw new Error(`Can't find any files in ${root}`)
13 return path.join(root, files[0])
14}
15
16describe('static assets', () => {
17 jest.setTimeout(60 * 1000)

Callers 1

static-assets.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected