diff --git a/.babelrc b/.babelrc deleted file mode 100644 index d7f32e7a..00000000 --- a/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["@babel/plugin-transform-modules-commonjs"] -} \ No newline at end of file diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index a731d53c..00000000 --- a/.eslintrc +++ /dev/null @@ -1,31 +0,0 @@ -{ - "env": { - "browser": true, - "es6": true, - "jest/globals": true - }, - "extends": [ - "airbnb-base" - ], - "globals": { - "Atomics": "readonly", - "SharedArrayBuffer": "readonly", - "firebase": "readonly" - }, - "plugins": ["jest"], - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "rules": { - "linebreak-style": 0, - "prefer-destructuring": 0, - "import/extensions": 0, - "import/prefer-default-export": 0, - "jest/no-disabled-tests": "warn", - "jest/no-focused-tests": "error", - "jest/no-identical-title": "error", - "jest/prefer-to-have-length": "warn", - "jest/valid-expect": "error" - } -} \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 47735411..00000000 --- a/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -*.swp -coverage/ -node_modules/ -.yarn.lock -package-lock.json \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 2cd8968b..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1 +0,0 @@ -123,125 \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 66891cc6..00000000 --- a/README.md +++ /dev/null @@ -1,138 +0,0 @@ -# Creando una Red Social - -## HELIVISUEL 🍿 - - - -## Índice - -* [1. Definición del producto](#1-definición-del-producto) -* [2. Historia de usuarios](#2-historia-de-usuarios) -* [3. Prototipos](#3-prototipos) -* [4. Test de usabilidad](#4-Test-de-usabilidad) -* [5. Objetivos de aprendizaje](#5-objetivos-de-aprendizaje) - -## 1. DEFINICIÓN DEL PRODUCTO - -### Definición del problema - -Con las mejoras en el flujo de datos a partir de tecnologías como 4G y 5G, el crecimiento de contenido audiovisual variado, de calidad y asequible a través de plataformas de streaming, se están creando comunidades de discusión sobre series, películas, documentales, cortometrajes, etc., donde las opiniones generan un valor sobre cada contenido para el usuario influenciado las decisiones sobre lo próximo que verá y al tiempo le permite compartir con personas que tienen intereses afines. - - -### Perfil del usuario - -Nuestros usuarios son personas entre los 18 y los 50 años tiene un interés por las películas, series y demás contenido audiovisual, que tienen acceso a las plataformas de streaming como Netflix, Disney +, Amazon Prime o Hulu o servicios de televisión o que frecuentan el cine, y a quiénes les gusta compartir y comparar opiniones sobre estas producciones. - -Nuestros usuarios abarcan desde aquel que se dedica profesionalmente a hacer reviews hasta personas que solo buscan aportar su opinión o una buena recomendación. Quieren poder agregar recomendaciones de otros a su lista de pendientes, y agregar una lista donde aparezca aquello que vio y quiere recomendar a la comunidad o comentar, participar en discusiones, poder buscar una película por su título ver las reviews asociadas y darles like, saber quién escribió la reseña (y si le gusta poder seguirlo). - - -## 2. HISTORIAS DE USUARIO - -* H1: El usuario se puede loguear o registrar -* H2: El usuario puede realizar posts y visualizarlos en su muro -* H3: El usuario podrá ingresar a su perfil y ver su información general -* H4: El usuario tendrá más opciones para interactuar en la red social - -## 3. PROTOTIPOS DE ALTA Y BAJA FIDELIDAD - -### Prototipos de baja fidelidad - - - - - - -### Prototipos de alta fidelidad - -Movil: https://www.figma.com/proto/vVV1qI2KgMuUCAKSVx8nxJ/Prototyping-in-Figma?node-id=31%3A492&scaling=scale-down - -Desktop: https://www.figma.com/proto/vVV1qI2KgMuUCAKSVx8nxJ/Prototyping-in-Figma?node-id=51%3A79&scaling=min-zoom - -Tablet: https://www.figma.com/proto/vVV1qI2KgMuUCAKSVx8nxJ/Prototyping-in-Figma?node-id=77%3A180&scaling=scale-down - -### Paleta de colores - - - - -## 2. Test de Usabilidad - -En los tests de usabilidad que se realizaron con nuestras compañeras y coach se identifico que la paleta de colores que estabamos utilizando era la correcta, les gusto el diseño de la página, como sugerencias nos dijeron que pusieramos la letra mas grande, adicional que le cambiaramos el color si era un link, y que el fondo del timeline fuera diferente al tono blanco para que la experiencia visual del usuario fuera mejor. - -El usuario interactua con la pagina de la siguiente manera: - -1. Primero el usuario entra a una pagina de Bienvenida a la red social donde puede ingresar. -2. Segundo encuentra una sección donde se puede loguear, tiene la opción de crear una cuenta o entrar con Google, adicional tiene la opción de recuperar la contraseña si la ha olvidado. -3. Tercero al haberse logueado ya puede ingresar al timeline, donde puede realizar una publicación teniendo en cuenta tres categorias: Películas, series o documentales. Además puede dar o quitar like a otras publicaciones. -4. Cuarto tiene una sección de perfil, donde puede cambiar su foto, agregar una biografia, y ver sus publicaciones, las cuales puede editar o eliminar. - -## 3. Objetivos de aprendizaje - -El objetivo principal de aprendizaje de este proyecto es construir una -[Single-page Application (SPA)](https://es.wikipedia.org/wiki/Single-page_application) -[_responsive_](https://github.com/Laboratoria/curricula-js/tree/master/topics/css/02-responsive) - (con más de una vista / página) en la que podamos **leer y escribir datos.** - -### HTML y CSS - -* [ ] [Uso de HTML semántico.](https://developer.mozilla.org/en-US/docs/Glossary/Semantics#Semantics_in_HTML) -* [ ] Uso de selectores de CSS. -* [ ] Construir tu aplicación respetando el diseño realizado (maquetación). -* [ ] [Uso de flexbox en CSS.](https://css-tricks.com/snippets/css/a-guide-to-flexbox/) - -### DOM y Web APIs - -* [ ] Uso de selectores del DOM. -* [ ] Manejo de eventos del DOM. -* [ ] [Manipulación dinámica del DOM.](https://developer.mozilla.org/es/docs/Referencia_DOM_de_Gecko/Introducci%C3%B3n) -(appendChild |createElement | createTextNode| innerHTML | textContent | etc.) -* [ ] [History API.](https://developer.mozilla.org/es/docs/DOM/Manipulando_el_historial_del_navegador) -* [ ] [localStorage.](https://developer.mozilla.org/es/docs/Web/API/Window/localStorage) - -### JavaScript - -* [ ] Uso de condicionales (if-else | switch | operador ternario) -* [ ] Uso de funciones (parámetros | argumentos | valor de retorno) -* [ ] Manipular arrays (filter | map | sort | reduce) -* [ ] Manipular objects (key | value) -* [ ] Uso ES modules ([`import`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) -| [`export`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export)) -* [ ] Diferenciar entre expression y statements. -* [ ] Diferenciar entre tipos de datos primitivos y no primitivos. -* [ ] [Uso de callbacks.](https://developer.mozilla.org/es/docs/Glossary/Callback_function) -* [ ] [Consumo de Promesas.](https://scotch.io/tutorials/javascript-promises-for-dummies#toc-consuming-promises) - -### Testing - -* [ ] [Testeo unitario.](https://jestjs.io/docs/es-ES/getting-started) -* [ ] [Testeo asíncrono.](https://jestjs.io/docs/es-ES/asynchronous) -* [ ] [Uso de librerias de Mock.](https://jestjs.io/docs/es-ES/manual-mocks) - -### Estructura del código y guía de estilo - -* [ ] Organizar y dividir el código en módulos (Modularización) -* [ ] Uso de identificadores descriptivos (Nomenclatura | Semántica) -* [ ] Uso de linter (ESLINT) - -### Git y Github - -* [ ] Uso de comandos de git (add | commit | pull | status | push) -* [ ] Manejo de repositorios de GitHub (clone | fork | gh-pages) -* [ ] Colaboración en Github (branches | pull requests | |tags) -* [ ] Organización en Github (projects | issues | labels | milestones) - -### Firebase - -* [ ] [Firestore.](https://firebase.google.com/docs/firestore) -* [ ] [Firebase Auth.](https://firebase.google.com/docs/auth/web/start) -* [ ] [Firebase security rules.](https://firebase.google.com/docs/rules) -* [ ] Observadores. ([onAuthStateChanged](https://firebase.google.com/docs/auth/web/manage-users?hl=es#get_the_currently_signed-in_user) - | [onSnapshot](https://firebase.google.com/docs/firestore/query-data/listen#listen_to_multiple_documents_in_a_collection)) - -### UX - -* [ ] Diseñar la aplicación pensando y entendiendo al usuario. -* [ ] Crear prototipos para obtener feedback e iterar. -* [ ] Aplicar los principios de diseño visual (contraste, alineación, jerarquía) -* [ ] Planear y ejecutar tests de usabilidad. - diff --git a/_mocks_/mock_auth.js b/_mocks_/mock_auth.js deleted file mode 100644 index c0ea264f..00000000 --- a/_mocks_/mock_auth.js +++ /dev/null @@ -1,42 +0,0 @@ -const auth = { - createUserWithEmailAndPassword: (email, password) => { - const emailChar = /[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/; - const passChar = /^.{6,}$/; - return new Promise ((resolve, reject) => { - const user = { - email: email, - password: password - }; - if (emailChar.test(email) && passChar.test(password)) { - user.email; - user.password; - } else { - reject('error'); - }; - - resolve(`nuevo usuario ${user.email}, ${user.password}`); - }) - }, - signInWithEmailAndPassword: (email, password) => { - return new Promise ((resolve, reject) => { - resolve(`usuario ${email}, ${password}`); - reject('error') - }) - }, - sendPasswordResetEmail: (email) => { - return new Promise ((resolve, reject) => { - resolve(email); - reject('error'); - }) - }, - signOut: () => { - return new Promise ((resolve, reject) => { - resolve(); - reject('error'); - }) - } -} - -export default jest.fn(() => { - return auth; -}) diff --git a/src/components/modal.js b/components/modal.js similarity index 100% rename from src/components/modal.js rename to components/modal.js diff --git a/src/components/printPost.js b/components/printPost.js similarity index 100% rename from src/components/printPost.js rename to components/printPost.js diff --git a/src/css/404.css b/css/404.css similarity index 100% rename from src/css/404.css rename to css/404.css diff --git a/src/css/background/home.png b/css/background/home.png similarity index 100% rename from src/css/background/home.png rename to css/background/home.png diff --git a/src/css/background/recoveraccaunt.png b/css/background/recoveraccaunt.png similarity index 100% rename from src/css/background/recoveraccaunt.png rename to css/background/recoveraccaunt.png diff --git a/src/css/background/thanksaccount.png b/css/background/thanksaccount.png similarity index 100% rename from src/css/background/thanksaccount.png rename to css/background/thanksaccount.png diff --git a/src/css/createAccount.css b/css/createAccount.css similarity index 100% rename from src/css/createAccount.css rename to css/createAccount.css diff --git a/src/css/home.css b/css/home.css similarity index 100% rename from src/css/home.css rename to css/home.css diff --git a/src/css/login.css b/css/login.css similarity index 100% rename from src/css/login.css rename to css/login.css diff --git a/src/css/modal.css b/css/modal.css similarity index 100% rename from src/css/modal.css rename to css/modal.css diff --git a/src/css/profile.css b/css/profile.css similarity index 100% rename from src/css/profile.css rename to css/profile.css diff --git a/src/css/recover.css b/css/recover.css similarity index 100% rename from src/css/recover.css rename to css/recover.css diff --git a/src/css/thanksAccount.css b/css/thanksAccount.css similarity index 100% rename from src/css/thanksAccount.css rename to css/thanksAccount.css diff --git a/src/css/timeline.css b/css/timeline.css similarity index 100% rename from src/css/timeline.css rename to css/timeline.css diff --git a/src/img/AdobeColor-My Color Theme (1).jpeg b/img/AdobeColor-My Color Theme (1).jpeg similarity index 100% rename from src/img/AdobeColor-My Color Theme (1).jpeg rename to img/AdobeColor-My Color Theme (1).jpeg diff --git a/src/img/Banner.png b/img/Banner.png similarity index 100% rename from src/img/Banner.png rename to img/Banner.png diff --git a/src/img/ICONO.PNG b/img/ICONO.PNG similarity index 100% rename from src/img/ICONO.PNG rename to img/ICONO.PNG diff --git a/src/img/IMG_20200730_110928545.jpg b/img/IMG_20200730_110928545.jpg similarity index 100% rename from src/img/IMG_20200730_110928545.jpg rename to img/IMG_20200730_110928545.jpg diff --git a/src/img/Imagen de iOS (1).jpg b/img/Imagen de iOS (1).jpg similarity index 100% rename from src/img/Imagen de iOS (1).jpg rename to img/Imagen de iOS (1).jpg diff --git a/src/img/Imagen de iOS.jpg b/img/Imagen de iOS.jpg similarity index 100% rename from src/img/Imagen de iOS.jpg rename to img/Imagen de iOS.jpg diff --git a/src/img/Perfil.png b/img/Perfil.png similarity index 100% rename from src/img/Perfil.png rename to img/Perfil.png diff --git a/src/img/Salir.png b/img/Salir.png similarity index 100% rename from src/img/Salir.png rename to img/Salir.png diff --git a/src/img/WhatsApp Image 2020-07-30 at 12.01.50 PM (2).jpeg b/img/WhatsApp Image 2020-07-30 at 12.01.50 PM (2).jpeg similarity index 100% rename from src/img/WhatsApp Image 2020-07-30 at 12.01.50 PM (2).jpeg rename to img/WhatsApp Image 2020-07-30 at 12.01.50 PM (2).jpeg diff --git a/src/img/besticono.png b/img/besticono.png similarity index 100% rename from src/img/besticono.png rename to img/besticono.png diff --git a/src/img/comment.png b/img/comment.png similarity index 100% rename from src/img/comment.png rename to img/comment.png diff --git a/src/img/delete.png b/img/delete.png similarity index 100% rename from src/img/delete.png rename to img/delete.png diff --git a/src/img/dislike.png b/img/dislike.png similarity index 100% rename from src/img/dislike.png rename to img/dislike.png diff --git a/src/img/documentales.png b/img/documentales.png similarity index 100% rename from src/img/documentales.png rename to img/documentales.png diff --git a/src/img/documentary.png b/img/documentary.png similarity index 100% rename from src/img/documentary.png rename to img/documentary.png diff --git a/src/img/edit.png b/img/edit.png similarity index 100% rename from src/img/edit.png rename to img/edit.png diff --git a/src/img/editProfile.png b/img/editProfile.png similarity index 100% rename from src/img/editProfile.png rename to img/editProfile.png diff --git a/src/img/error404.png b/img/error404.png similarity index 100% rename from src/img/error404.png rename to img/error404.png diff --git a/src/img/exit.png b/img/exit.png similarity index 100% rename from src/img/exit.png rename to img/exit.png diff --git a/src/img/fondovhs.png b/img/fondovhs.png similarity index 100% rename from src/img/fondovhs.png rename to img/fondovhs.png diff --git a/src/img/foto.jpg b/img/foto.jpg similarity index 100% rename from src/img/foto.jpg rename to img/foto.jpg diff --git a/src/img/google.png b/img/google.png similarity index 100% rename from src/img/google.png rename to img/google.png diff --git a/src/img/icon.png b/img/icon.png similarity index 100% rename from src/img/icon.png rename to img/icon.png diff --git a/src/img/img.png b/img/img.png similarity index 100% rename from src/img/img.png rename to img/img.png diff --git a/src/img/like.png b/img/like.png similarity index 100% rename from src/img/like.png rename to img/like.png diff --git a/src/img/menu.png b/img/menu.png similarity index 100% rename from src/img/menu.png rename to img/menu.png diff --git a/src/img/movie.png b/img/movie.png similarity index 100% rename from src/img/movie.png rename to img/movie.png diff --git a/src/img/ojo-abierto.png b/img/ojo-abierto.png similarity index 100% rename from src/img/ojo-abierto.png rename to img/ojo-abierto.png diff --git a/src/img/ojo-bloqueado.png b/img/ojo-bloqueado.png similarity index 100% rename from src/img/ojo-bloqueado.png rename to img/ojo-bloqueado.png diff --git a/src/img/peliculas.png b/img/peliculas.png similarity index 100% rename from src/img/peliculas.png rename to img/peliculas.png diff --git a/src/img/profile.png b/img/profile.png similarity index 100% rename from src/img/profile.png rename to img/profile.png diff --git a/src/img/serie.png b/img/serie.png similarity index 100% rename from src/img/serie.png rename to img/serie.png diff --git a/src/img/series.png b/img/series.png similarity index 100% rename from src/img/series.png rename to img/series.png diff --git a/src/img/user.png b/img/user.png similarity index 100% rename from src/img/user.png rename to img/user.png diff --git a/src/index.html b/index.html similarity index 100% rename from src/index.html rename to index.html diff --git a/src/lib/firebaseAuth.js b/lib/firebaseAuth.js similarity index 100% rename from src/lib/firebaseAuth.js rename to lib/firebaseAuth.js diff --git a/src/lib/firebaseFirestore.js b/lib/firebaseFirestore.js similarity index 100% rename from src/lib/firebaseFirestore.js rename to lib/firebaseFirestore.js diff --git a/src/lib/index.js b/lib/index.js similarity index 100% rename from src/lib/index.js rename to lib/index.js diff --git a/src/main.js b/main.js similarity index 100% rename from src/main.js rename to main.js diff --git a/package.json b/package.json deleted file mode 100644 index 2701ffe4..00000000 --- a/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "social-network", - "version": "1.0.0", - "description": "Social Network @ Laboratoria", - "main": "src/index.html", - "keywords": [ - "javascript", - "firebase", - "jest" - ], - "license": "MIT", - "scripts": { - "htmlhint": "htmlhint dist/*.html ", - "eslint": "eslint --ext .js src/ test/", - "stylelint": "stylelint --aei src/**/*.css", - "pretest": "npm run htmlhint && npm run eslint && npm run stylelint", - "test": "jest --coverage", - "start": "serve src/", - "deploy": "gh-pages -d src" - }, - "devDependencies": { - "@babel/core": "^7.2.2", - "@babel/plugin-transform-modules-commonjs": "^7.2.0", - "babel-core": "^7.0.0-bridge.0", - "babel-jest": "^24.8.0", - "eslint": "^6.0.1", - "eslint-config-airbnb-base": "^13.2.0", - "eslint-plugin-import": "^2.18.2", - "eslint-plugin-jest": "^22.1.2", - "htmlhint": "^0.11.0", - "jest": "^24.8.0", - "mock-cloud-firestore": "^0.12.0", - "regenerator-runtime": "^0.13.1", - "serve": "^11.0.2", - "stylelint": "^10.1.0", - "stylelint-config-recommended": "^2.2.0" - } -} diff --git a/src/style.css b/style.css similarity index 100% rename from src/style.css rename to style.css diff --git a/stylelint.config.js b/stylelint.config.js deleted file mode 100644 index f73cf2e5..00000000 --- a/stylelint.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - extends: 'stylelint-config-recommended', -}; diff --git a/test/firebaseAuth.spec.js b/test/firebaseAuth.spec.js deleted file mode 100644 index 7e620508..00000000 --- a/test/firebaseAuth.spec.js +++ /dev/null @@ -1,61 +0,0 @@ -// importamos la funciones firebase.auth que vamos a testear -import authmock from '../_mocks_/mock_auth.js'; - -import { - signUp, logIn, logInGoogle, recoverPass, signOut, -} from '../src/lib/firebaseAuth.js'; - -global.auth = authmock(); - -describe('signUp', () => { - it('debería ser una función', () => { - expect(typeof signUp).toBe('function'); - }); - - it('debería retornar email@email.com , contraseña1234', async () => { - const newUser = await signUp('email@email.com', 'contraseña1234'); - expect(newUser).toBe('nuevo usuario email@email.com, contraseña1234'); - }); - - it('debería retornar error;', async () => { - const newUser = await signUp('email@emailcom', 'contraseña123'); - expect(newUser).toBe('error'); - }); - - it('debería retornar error;', async () => { - const newUser = await signUp('email@email.com', 'abc'); - expect(newUser).toBe('error'); - }); -}); - -describe('logIn', () => { - it('debería ser una función', () => { - expect(typeof logIn).toBe('function'); - }); - it('debería retornar email@email.com , contraseña1234', async () => { - const user = await logIn('email@email.com', 'contraseña1234'); - console.log(user); - expect(user).toBe('usuario email@email.com, contraseña1234'); - }); -}); - -describe('recoverPass', () => { - it('debería ser una función', () => { - expect(typeof recoverPass).toBe('function'); - }); - it('debería retornar Hemos enviado un email a email@email.com para cambiar la contraseña', async () => { - const message = document.createElement('p'); - const recover = await recoverPass(message, 'email@email.com'); - expect(recover).toBe('Hemos enviado un email a email@email.com para cambiar la contraseña'); - }); -}); - -describe('signOut', () => { - it('debería ser una función', () => { - expect(typeof signOut).toBe('function'); - }); - it('debería retornar Hemos enviado un email a email@email.com para cambiar la contraseña', async () => { - const outUser = await signOut(); - expect(outUser).toBe(undefined); - }); -}); diff --git a/test/firebaseFirestore.spec.js b/test/firebaseFirestore.spec.js deleted file mode 100644 index b80870c3..00000000 --- a/test/firebaseFirestore.spec.js +++ /dev/null @@ -1,91 +0,0 @@ -/* import MockFirebase from 'mock-cloud-firestore'; -import {userInfo} from '../src/lib/firebaseFirestore.js'; - -const docData = { - _collection_: { - users: { - _doc_: { - R2xnPuxHGsU23naoE995KpDVMMS2:{ - name: 'Clara Liseth Escobar Sarmiento', - photo: 'https://lh3.googleusercontent.com/a-/AOh14Gjd2axTXkLKn9mez9759cIcJ3PRAX1M1FJNS99Z', - biography:"Me gustan las peliculas animadas, las de Toy Story son mis favoritas", - }, - JTSmY5bDJ3bJ0cuqQYfrFNHu5q32:{ - name: 'Catalina Olarte', - photo: 'https://lh3.googleusercontent.com/a-/AOh14Gjvywru7_vdHpVDIo0EawLkApR3kYnvJ9BZzJKX5g', - biography:'Cuéntanos algo sobre tí', - }, - }, - }, - }, -}; - -global.firebase = new MockFirebase (docData,{isNaiveSnapshotListenerEnabled: true }); - -global.data = firebase.firestore(); - -describe('userInfo',() =>{ - it.only('deberia retornar 2 usuarios'), async ()=>{ - const post = await userInfo(); - console.log(post) - expect(post.length).toBe(2); - }; -}); */ -import MockFirebase from 'mock-cloud-firestore'; - -import { userInfo, likePost, loadPost } from '../src/lib/firebaseFirestore.js'; - -const data = { - __collection__: { - users: { - __doc__: { - nn123: { - biography: 'Algo sobre tí', - name: 'Usuario Desconocido', - photo: '..img/user.png', - }, - nn456: { - biography: 'Qué buena onda chico', - name: 'Crush', - photo: '..img/user.png', - }, - }, - }, - post: { - __doc__: { - n123n: { - category: 'movie', - comment: 'Ayer fue el dia de rayo mcqueen pero prefiero a mate', - date: '7 de septiembre de 2020, 9:46:19 UTC-5', - likes: [], - userID: 'nn123', - }, - }, - }, - }, -}; - -global.firebase = new MockFirebase(data, { isNaiveSnapshotListenerEnabled: true }); - -global.data = firebase.firestore(); - -describe('userInfo', () => { - it('debería retornar 2 usuarios', async () => { - const users = await userInfo(); - expect(users).toHaveLength(2); - }); -}); - -describe('likePost', () => { - it('likes +', async () => { - const currentUserId = 'nn123'; - const postId = 'n123n'; - const pushLike = true; - const printPost = data => containerDOM.innerHTML = data.data(); - let containerDOM = document.createElement('div'); - const post = await likePost(currentUserId, postId, pushLike); - await loadPost(containerDOM); - console.log(loadPost(containerDOM, printPost)); - expect().toBe(2); - }); -}); diff --git a/test/index.spec.js b/test/index.spec.js deleted file mode 100644 index 91f11a33..00000000 --- a/test/index.spec.js +++ /dev/null @@ -1,8 +0,0 @@ -// importamos la funcion que vamos a testear -import { myFunction } from '../src/lib/index'; - -describe('myFunction', () => { - it('debería ser una función', () => { - expect(typeof myFunction).toBe('function'); - }); -}); diff --git a/src/views/404.js b/views/404.js similarity index 100% rename from src/views/404.js rename to views/404.js diff --git a/src/views/createAccount.js b/views/createAccount.js similarity index 100% rename from src/views/createAccount.js rename to views/createAccount.js diff --git a/src/views/home.js b/views/home.js similarity index 100% rename from src/views/home.js rename to views/home.js diff --git a/src/views/login.js b/views/login.js similarity index 100% rename from src/views/login.js rename to views/login.js diff --git a/src/views/profile.js b/views/profile.js similarity index 100% rename from src/views/profile.js rename to views/profile.js diff --git a/src/views/recover.js b/views/recover.js similarity index 100% rename from src/views/recover.js rename to views/recover.js diff --git a/src/views/thankAccount.js b/views/thankAccount.js similarity index 100% rename from src/views/thankAccount.js rename to views/thankAccount.js diff --git a/src/views/timeline.js b/views/timeline.js similarity index 100% rename from src/views/timeline.js rename to views/timeline.js