Buckets:
silverwolf-x/project / test /e2e /app-dir /cache-components-errors /cache-components-errors.module-scope.test.ts
| import { nextTestSetup } from 'e2e-utils' | |
| describe('Lazy Module Init', () => { | |
| const { next, isNextDev, skipped } = nextTestSetup({ | |
| files: __dirname + '/fixtures/lazy-module-init', | |
| skipStart: true, | |
| skipDeployment: true, | |
| }) | |
| if (skipped) { | |
| return | |
| } | |
| if (isNextDev) { | |
| it('does not run in dev', () => {}) | |
| return | |
| } | |
| it('should build statically even if module scope uses sync APIs like current time and random', async () => { | |
| try { | |
| await next.start() | |
| } catch { | |
| throw new Error('expected build not to fail for fully static project') | |
| } | |
| expect(next.cliOutput).toContain('○ /server') | |
| expect(next.cliOutput).toContain('○ /client') | |
| expect(next.cliOutput).toContain('○ /client-page') | |
| expect(next.cliOutput).toContain('◐ /[dyn]') | |
| let $ | |
| $ = await next.render$('/server') | |
| expect($('#id').text().length).toBeGreaterThan(0) | |
| $ = await next.render$('/client') | |
| expect($('#id').text().length).toBeGreaterThan(0) | |
| $ = await next.render$('/client-page') | |
| expect($('#id').text().length).toBeGreaterThan(0) | |
| $ = await next.render$('/foo') | |
| expect($('#id').text().length).toBeGreaterThan(0) | |
| $ = await next.render$('/serial-client-sync-io') | |
| expect($('#id').text().length).toBeGreaterThan(0) | |
| }) | |
| }) | |
Xet Storage Details
- Size:
- 1.31 kB
- Xet hash:
- 508a1c2562adc9ff623ddbbee316c312cac2e405ec402cd4f0ae49ad0b2b3c64
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.