Skip to content

✨ - Update to NextJs 14 and migrate to next-mdx-remote #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions __test__/_app/Page.test.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { describe, expect, it } from 'vitest'
import Page from '../../src/app/page'
import Home from '../../src/app/page'
import { render, screen } from '@testing-library/react'

describe('Page', () => {
it('should render', () => {
const component = render(<Page />)
expect(component).toBeDefined()
it('should render', async () => {
const jsx = await Home()
expect(jsx).toBeDefined()
})
it('should render blog title', () => {
render(<Page />)
it('should render blog title', async () => {
const jsx = await Home()
render(jsx)
expect(screen.getByText('Blog')).toBeDefined()
})
})
31 changes: 1 addition & 30 deletions __test__/_app/[slug]/Page.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest'
import BlogPage, { generateMetadata } from '../../../src/app/[slug]/page'
import BlogPage from '../../../src/app/[slug]/page'
import { render } from '@testing-library/react'

describe('PageSlug', () => {
Expand All @@ -11,32 +11,3 @@ describe('PageSlug', () => {
expect(component).toBeDefined()
})
})

describe('generateMetadata', () => {
it('Should return metadata', async () => {
const metadata = await generateMetadata({
params: { slug: 'resources_developers' },
})
expect(metadata).toEqual({
description:
'Mis 5 Sitios Favoritos para Aprender Programación | @claudio_coder',
openGraph: {
description:
'Mis 5 Sitios Favoritos para Aprender Programación | @claudio_coder',
images: 'https://claudiocoder.me/profile.jpg',
locale: 'es',
siteName: 'claudiocoder.me',
title: 'Mis 5 Sitios Favoritos para Aprender Programación',
url: 'https://claudiocoder.me/resources_developers',
},
title: 'Mis 5 Sitios Favoritos para Aprender Programación',
twitter: {
card: 'summary_large_image',
description:
'Mis 5 Sitios Favoritos para Aprender Programación | @claudio_coder',
images: 'https://claudiocoder.me/profile.jpg',
title: 'Mis 5 Sitios Favoritos para Aprender Programación',
},
})
})
})
40 changes: 0 additions & 40 deletions contentlayer.config.ts

This file was deleted.

4 changes: 1 addition & 3 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const { withContentlayer } = require('next-contentlayer')

/** @type {import('next').NextConfig} */
const nextConfig = { reactStrictMode: true, swcMinify: true }

module.exports = withContentlayer(nextConfig)
module.exports = nextConfig
Loading
Loading