From 2f933bcad9fb508e2b89f1425e2b7060cf217a70 Mon Sep 17 00:00:00 2001 From: Santiago21112001 Date: Sun, 10 Mar 2024 16:42:22 +0100 Subject: [PATCH] Arreglado errores --- questionservice/package-lock.json | 22 ++++++++++++++++++++- questionservice/question-service.test.js | 5 +++++ webapp/src/App.test.js | 2 +- webapp/src/components/navbar/NavBar.test.js | 2 +- webapp/src/index.js | 6 +++--- 5 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 questionservice/question-service.test.js diff --git a/questionservice/package-lock.json b/questionservice/package-lock.json index 4e019e9..583ae91 100644 --- a/questionservice/package-lock.json +++ b/questionservice/package-lock.json @@ -15,7 +15,8 @@ "express": "^4.18.2", "jsonwebtoken": "^9.0.2", "mongoose": "^8.0.4", - "mysql2": "^3.9.2" + "mysql2": "^3.9.2", + "node-cron": "^3.0.0" }, "devDependencies": { "jest": "^29.7.0", @@ -4351,6 +4352,17 @@ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" }, + "node_modules/node-cron": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/node-cron/-/node-cron-3.0.3.tgz", + "integrity": "sha512-dOal67//nohNgYWb+nWmg5dkFdIwDm8EpeGYMekPMrngV3637lqnX0lbUcCtgibHTz6SEz7DAIjKvKDFYCnO1A==", + "dependencies": { + "uuid": "8.3.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -5507,6 +5519,14 @@ "node": ">= 0.4.0" } }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/v8-to-istanbul": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", diff --git a/questionservice/question-service.test.js b/questionservice/question-service.test.js new file mode 100644 index 0000000..c42bf40 --- /dev/null +++ b/questionservice/question-service.test.js @@ -0,0 +1,5 @@ +describe('questionservice', () => { + test('test', () => { + + }); +}); diff --git a/webapp/src/App.test.js b/webapp/src/App.test.js index f692cd7..0005d8a 100644 --- a/webapp/src/App.test.js +++ b/webapp/src/App.test.js @@ -1,6 +1,6 @@ import React from 'react'; import { render } from '@testing-library/react'; -import App from './App'; +import App from './App.js'; describe('App Component', () => { test('renders App component', () => { diff --git a/webapp/src/components/navbar/NavBar.test.js b/webapp/src/components/navbar/NavBar.test.js index eb02368..b56749d 100644 --- a/webapp/src/components/navbar/NavBar.test.js +++ b/webapp/src/components/navbar/NavBar.test.js @@ -1,6 +1,6 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; -import Navbar from './Navbar'; +import Navbar from './Navbar.js'; import { AuthProvider } from '../authcontext'; import { BrowserRouter as Router} from 'react-router-dom'; diff --git a/webapp/src/index.js b/webapp/src/index.js index 8bc30f4..8b4f33f 100644 --- a/webapp/src/index.js +++ b/webapp/src/index.js @@ -2,9 +2,9 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; import reportWebVitals from './reportWebVitals'; -import Navbar from './components/navbar/NavBar'; -import AddUser from './components/adduser/AddUser'; -import Login from './components/login/Login'; +import Navbar from './components/navbar/NavBar.js'; +import AddUser from './components/adduser/AddUser.js'; +import Login from './components/login/Login.js'; import { AuthProvider } from './components/authcontext'; import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; import CssBaseline from '@mui/material/CssBaseline';