Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shuding committed Sep 16, 2022
1 parent d70a37c commit 1b4940e
Show file tree
Hide file tree
Showing 27 changed files with 54 additions and 0 deletions.
@@ -1,3 +1,5 @@
'client'

import { useState, useEffect } from 'react'

import style from './style.module.css'
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/app-dir/app/app/client-nested/layout.client.js
@@ -1,3 +1,5 @@
'client'

import { useState, useEffect } from 'react'

import styles from './style.module.css'
Expand Down
@@ -1,3 +1,5 @@
'client'

// export function getServerSideProps() { { props: {} } }

export default function Page() {
Expand Down
@@ -1,3 +1,5 @@
'client'

// export function getStaticProps() { return { props: {} }}

export default function Page() {
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/app-dir/app/app/css/css-client/layout.client.js
@@ -1,3 +1,5 @@
'client'

import './client-layout.css'

import Foo from './foo'
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/app-dir/app/app/css/css-client/page.client.js
@@ -1,3 +1,5 @@
'client'

import './client-page.css'

export default function Page() {
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/app-dir/app/app/css/css-nested/layout.client.js
@@ -1,3 +1,5 @@
'client'

import './style.css'
import styles from './style.module.css'

Expand Down
2 changes: 2 additions & 0 deletions test/e2e/app-dir/app/app/css/css-nested/page.client.js
@@ -1,3 +1,5 @@
'client'

export default function Page() {
return null
}
2 changes: 2 additions & 0 deletions test/e2e/app-dir/app/app/dashboard/client-comp.client.jsx
@@ -1,3 +1,5 @@
'client'

import styles from './client-comp.module.css'

import { useEffect, useState } from 'react'
Expand Down
@@ -1,3 +1,5 @@
'client'

import dynamic from 'next/dist/client/components/shared/dynamic'

const Dynamic = dynamic(() => import('../text-dynamic.client'))
Expand Down
@@ -1,3 +1,5 @@
'client'

import { useState, lazy } from 'react'

const Lazy = lazy(() => import('../text-lazy.client.js'))
Expand Down
@@ -1,3 +1,5 @@
'client'

import { useState } from 'react'
import styles from './dynamic.module.css'

Expand Down
2 changes: 2 additions & 0 deletions test/e2e/app-dir/app/app/dashboard/index/text-lazy.client.js
@@ -1,3 +1,5 @@
'client'

import styles from './lazy.module.css'

export default function LazyComponent() {
Expand Down
@@ -1,3 +1,5 @@
'client'

export default function ErrorBoundary({ error, reset }) {
return (
<>
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/app-dir/app/app/error/clientcomponent/page.client.js
@@ -1,3 +1,5 @@
'client'

import { useState } from 'react'

export default function Page() {
Expand Down
@@ -1,3 +1,5 @@
'client'

export default function Page() {
throw new Error('Error during SSR')
}
@@ -1,3 +1,5 @@
'client'

import { useCookies } from 'next/dist/client/components/hooks-server'

export default function Page() {
Expand Down
@@ -1,3 +1,5 @@
'client'

import { useHeaders } from 'next/dist/client/components/hooks-server'

export default function Page() {
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/app-dir/app/app/hooks/use-pathname/page.client.js
@@ -1,3 +1,5 @@
'client'

import { usePathname } from 'next/dist/client/components/hooks-client'

export default function Page() {
Expand Down
@@ -1,3 +1,5 @@
'client'

import { usePreviewData } from 'next/dist/client/components/hooks-server'

export default function Page() {
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/app-dir/app/app/hooks/use-router/page.client.js
@@ -1,3 +1,5 @@
'client'

import { useRouter } from 'next/dist/client/components/hooks-client'

export default function Page() {
Expand Down
@@ -1,3 +1,5 @@
'client'

export default function Page() {
return <h1 id="router-sub-page">hello from /hooks/use-router/sub-page</h1>
}
2 changes: 2 additions & 0 deletions test/e2e/app-dir/app/app/navigation/link.client.js
@@ -1,3 +1,5 @@
'client'

import { useRouter } from 'next/dist/client/components/hooks-client'
import React from 'react'
import { useEffect } from 'react'
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/app-dir/app/app/old-router/Router.client.js
@@ -1,3 +1,5 @@
'client'

import { useRouter, withRouter } from 'next/router'
import IsNull from './IsNull'

Expand Down
@@ -1,3 +1,5 @@
'client'

export default function Page({ params, searchParams }) {
return (
<h1
Expand Down
@@ -1,3 +1,5 @@
'client'

export default function ShouldNotServeClientDotJs(props) {
return (
<>
Expand Down
@@ -1,3 +1,5 @@
'client'

import { useState } from 'react'

export default function Template({ children }) {
Expand Down

0 comments on commit 1b4940e

Please sign in to comment.