MCPcopy
hub / github.com/vercel/next.js / runTests

Function runTests

test/integration/typescript-paths/test/index.test.ts:24–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22}
23
24function runTests() {
25 describe('default behavior', () => {
26 beforeAll(async () => {
27 appPort = await findPort()
28 app = await launchApp(appDir, appPort, {})
29 })
30 afterAll(() => killApp(app))
31
32 it('should alias components', async () => {
33 const $ = await get$('/basic-alias')
34 expect($('body').text()).toMatch(/World/)
35 })
36
37 it('should resolve the first item in the array first', async () => {
38 const $ = await get$('/resolve-order')
39 expect($('body').text()).toMatch(/Hello from a/)
40 })
41
42 it('should resolve the second item in as a fallback', async () => {
43 const $ = await get$('/resolve-fallback')
44 expect($('body').text()).toMatch(/Hello from only b/)
45 })
46
47 it('should resolve a single matching alias', async () => {
48 const $ = await get$('/single-alias')
49 expect($('body').text()).toMatch(/Hello/)
50 })
51
52 it('should not resolve to .d.ts files', async () => {
53 const $ = await get$('/alias-to-d-ts')
54 expect($('body').text()).toMatch(/Not aliased to d\.ts file/)
55 })
56 })
57}
58
59describe('typescript paths', () => {
60 runTests()

Callers 1

index.test.tsFile · 0.70

Calls 9

findPortFunction · 0.90
launchAppFunction · 0.90
killAppFunction · 0.90
describeFunction · 0.85
get$Function · 0.70
textMethod · 0.65
itFunction · 0.50
expectFunction · 0.50
$Function · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…