-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1104 from ankitkarna99/nextjs-13-update
Nextjs 13 update
- Loading branch information
Showing
126 changed files
with
8,824 additions
and
7,405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module.exports = ({ | ||
Trans: jest.fn(({ children }) => children), | ||
t: jest.fn((x) => x) | ||
Trans: jest.fn(({ children }) => { return children }), | ||
t: jest.fn((x) => { return x }) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
module.exports = {}; | ||
module.exports = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
import { initiateTest } from "@/utils/unit-tests/helpers"; | ||
import { screen } from "@testing-library/react"; | ||
import Index from "@/src/pages/index"; | ||
import { initiateTest } from '@/utils/unit-tests/helpers' | ||
import { screen } from '@testing-library/react' | ||
import Index from '@/src/pages/index' | ||
|
||
jest.mock("@/modules/home", () => { | ||
jest.mock('@/modules/home', () => { | ||
return { | ||
__esModule: true, | ||
default: () => { | ||
return <div data-testid="homepage"></div>; | ||
}, | ||
}; | ||
}); | ||
return <div data-testid='homepage' /> | ||
} | ||
} | ||
}) | ||
|
||
describe("Index test", () => { | ||
const { initialRender } = initiateTest(Index); | ||
describe('Index test', () => { | ||
const { initialRender } = initiateTest(Index) | ||
|
||
beforeEach(() => { | ||
initialRender(); | ||
}); | ||
initialRender() | ||
}) | ||
|
||
test("should display homepage", () => { | ||
const homepage = screen.getByTestId("homepage"); | ||
expect(homepage).toBeInTheDocument(); | ||
}); | ||
}); | ||
test('should display homepage', () => { | ||
const homepage = screen.getByTestId('homepage') | ||
expect(homepage).toBeInTheDocument() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
jest.setTimeout(90 * 1000); | ||
import '@testing-library/jest-dom/extend-expect' | ||
|
||
import "@testing-library/jest-dom/extend-expect"; | ||
jest.setTimeout(90 * 1000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,19 @@ | ||
const nextConfigFactory = require('./next.config') | ||
|
||
const nextConfig = nextConfigFactory() | ||
|
||
module.exports = { | ||
locales: [ | ||
'en', | ||
// "es", | ||
'fr', | ||
'ja', | ||
'zh' | ||
// "de", | ||
// "id", | ||
// "it", | ||
// "ko", | ||
// "ru", | ||
// "el", | ||
// "tr", | ||
// "vi", | ||
], | ||
locales: nextConfig.i18n.locales, | ||
catalogs: [ | ||
{ | ||
path: '<rootDir>/locales/{locale}/messages', | ||
include: ['<rootDir>/src', '<rootDir>/lib'] | ||
} | ||
], | ||
sourceLocale: nextConfig.i18n.defaultLocale, | ||
fallbackLocales: { | ||
default: 'en' | ||
default: nextConfig.i18n.defaultLocale | ||
}, | ||
sourceLocale: 'en', | ||
format: 'po', | ||
formatOptions: { origins: true, lineNumbers: true } | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.