next.js/test/e2e/app-dir/self-importing-package/self-importing-package.test.ts
self-importing-package.test.ts20 lines619 B
import { nextTestSetup } from 'e2e-utils'
import path from 'path'

describe('self-importing-package', () => {
  const { next } = nextTestSetup({
    files: __dirname,
    // This test is skipped when deployed because the local tarball appears corrupted
    // It also doesn't seem particularly useful to test when deployed
    skipDeployment: true,
    dependencies: {
      'internal-pkg': `file:${path.join(__dirname, 'internal-pkg.tar')}`,
    },
  })

  it('should resolve self-imports in an external package', async () => {
    const $ = await next.render$('/')
    expect($('h1').text()).toBe('test abc')
  })
})
Quest for Codev2.0.0
/
SIGN IN