Skip to content

Commit

Permalink
✨ - Update to NextJs 14 and migrate to next-mdx-remote (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiocoder authored Aug 13, 2024
1 parent bf162e9 commit 418a892
Show file tree
Hide file tree
Showing 18 changed files with 8,212 additions and 8,514 deletions.
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

0 comments on commit 418a892

Please sign in to comment.