test: add major version to unit test

This commit is contained in:
Daniel Roe 2025-02-14 21:03:41 +01:00
parent a85ca58382
commit 676447239e
No known key found for this signature in database
GPG Key ID: CBC814C393D93268

View File

@ -15,7 +15,7 @@ describe('loadNuxt', () => {
beforeAll(async () => {
await mkdir(join(tempDir, 'nuxt'), { recursive: true })
await writeFile(join(tempDir, 'package.json'), '{"dependencies":{"nuxt":"file:./nuxt"}}')
await writeFile(join(tempDir, 'nuxt', 'package.json'), '{"name":"nuxt","type":"module","exports":{".":"./index.js"}}')
await writeFile(join(tempDir, 'nuxt', 'package.json'), '{"name":"nuxt","version":"3.0.0","type":"module","exports":{".":"./index.js"}}')
await writeFile(join(tempDir, 'nuxt', 'index.js'), 'export const loadNuxt = (opts) => ({ name: "it me" })')
await x('npm', ['install'], { nodeOptions: { cwd: tempDir } })
})