Skip to content

Commit

Permalink
fixed imports for vitest configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikelle Wade committed Jan 25, 2024
1 parent 57fc358 commit cb71303
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "npm-react-chatlog",
"name": "react-chatlog",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
"preview": "vite preview",
"test": "vitest"
},
"dependencies": {
"react": "^18.2.0",
Expand Down
1 change: 1 addition & 0 deletions src/App.test.js → src/App.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import App from './App';
import { render, screen, fireEvent } from '@testing-library/react';


describe('Wave 03: clicking like button and rendering App', () => {
test('that the correct number of likes is printed at the top', () => {
// Arrange
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import '@testing-library/jest-dom/extend-expect';
import ChatLog from './ChatLog';
import { render, screen } from '@testing-library/react';
import '@testing-library/jest-dom/extend-expect';

const LOG = [
{
Expand Down
6 changes: 6 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
test: {
// jest config here
reporters: ['verbose'],
environment: 'jsdom',
globals: true
},
})

0 comments on commit cb71303

Please sign in to comment.