()
| 22 | } |
| 23 | |
| 24 | function 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 | |
| 59 | describe('typescript paths', () => { |
| 60 | runTests() |
no test coverage detected
searching dependent graphs…