Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed May 5, 2023
1 parent 0c217b1 commit 986dd0f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/e2e/app-dir/app/index.test.ts
Expand Up @@ -205,6 +205,12 @@ createNextDescribe(
})
}

it('should serve from pages with latest react', async () => {
const $ = await next.render$('/')
expect($('#hello').text()).toBe('hello from pages/index')
expect($('#react-version').text()).toBe('18.2.0')
})

if (isNextStart) {
it('should generate build traces correctly', async () => {
const trace = JSON.parse(
Expand Down Expand Up @@ -264,12 +270,6 @@ createNextDescribe(
expect($('title').first().text()).toBe('hello world')
})

it('should serve from pages with latest react', async () => {
const $ = await next.render$('/')
expect($('#hello').text()).toBe('hello from pages/index')
expect($('#react-version').text()).toBe('18.2.0')
})

it('should serve dynamic route from pages', async () => {
const html = await next.render('/blog/first')
expect(html).toContain('hello from pages/blog/[slug]')
Expand Down

0 comments on commit 986dd0f

Please sign in to comment.