Skip to content

Commit

Permalink
chore: remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh committed Jun 24, 2024
1 parent 8913569 commit 29607db
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tests/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import getPort from 'get-port'
import { getDeployStore } from '@netlify/blobs'
import { BlobsServer } from '@netlify/blobs/server'
import type { NetlifyPluginUtils } from '@netlify/build'
import IncrementalCache from 'next/dist/server/lib/incremental-cache/index.js'
import { Buffer } from 'node:buffer'
import { mkdtemp } from 'node:fs/promises'
import { tmpdir } from 'node:os'
Expand All @@ -12,20 +11,6 @@ import { assert, vi } from 'vitest'
import { BLOB_TOKEN } from './constants'
import { type FixtureTestContext } from './contexts'

/**
* Uses next.js incremental cache to compute the same cache key for a URL that is automatically generated
* This is needed for mocking out fetch calls to test them
*/
export const getFetchCacheKey = async (url: string) => {
const incCache = new IncrementalCache.IncrementalCache({
requestHeaders: {},
getPrerenderManifest: () => ({}),
} as any)

const key = await incCache.fetchCacheKey(url)
return key
}

/**
* Generates a 24char deploy ID (this is validated in the blob storage so we cant use a uuidv4)
* @returns
Expand Down

0 comments on commit 29607db

Please sign in to comment.