forked from Laboratoria/LIM016-social-network
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from kalyzca/develop
Develop - test2
- Loading branch information
Showing
6 changed files
with
108 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Importamos las funciones de firestore | ||
// import { addDoc, collection, db } from '../src/lib/firebase/config'; | ||
|
||
// Importamos las funciones que vamos a testear | ||
// import { saveUser } from '../src/lib/firebase/firestore.js'; | ||
|
||
// Llamamos a la función que mockea las funciones de firebase | ||
jest.mock('../src/lib/firebase/config.js'); | ||
|
||
// Testeando el registro de un usuario con firebase - auth | ||
// describe('probar la función saveUser', () => { | ||
// it('Deberia subir data a la coleccion saveUsers', () => saveUser('karenberrio@gmail.com', '123456', 'karen', 'PsCjKz4DgTMRVTy6POdDYzmL2bD3')); | ||
|
||
// it('Debería retornar al usuario creado', async () => { | ||
// const result = await addDoc(collection(db, 'saveUsers')); | ||
// expect(result).toEqual({ | ||
// email: 'karenberrio@gmail.com', | ||
// password: '123456', | ||
// uid: 'PsCjKz4DgTMRVTy6POdDYzmL2bD3', | ||
// user: 'karen', | ||
// }); | ||
// }); | ||
// }); |