mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
668e1196d1
* chore: setup tauri test * chore: update test * chore: update test * chore: update test * chore: update test * refactor: test folder location * chore: remove deps * ci: fix build --------- Co-authored-by: appflowy <annie@appflowy.io> Co-authored-by: nathan <nathan@appflowy.io>
44 lines
1.4 KiB
TypeScript
44 lines
1.4 KiB
TypeScript
export {}
|
|
// import { AuthBackendService, UserBackendService } from '../appflowy_app/stores/effects/user/user_bd_svc';
|
|
// import { randomFillSync } from 'crypto';
|
|
// import { nanoid } from '@reduxjs/toolkit';
|
|
|
|
// beforeAll(() => {
|
|
// //@ts-ignore
|
|
// window.crypto = {
|
|
// // @ts-ignore
|
|
// getRandomValues: function (buffer) {
|
|
// // @ts-ignore
|
|
// return randomFillSync(buffer);
|
|
// },
|
|
// };
|
|
// });
|
|
|
|
// describe('User backend service', () => {
|
|
// it('sign up', async () => {
|
|
// const service = new AuthBackendService();
|
|
// const result = await service.autoSignUp();
|
|
// expect(result.ok).toBeTruthy;
|
|
// });
|
|
|
|
// it('sign in', async () => {
|
|
// const authService = new AuthBackendService();
|
|
// const email = nanoid(4) + '@appflowy.io';
|
|
// const password = nanoid(10);
|
|
// const signUpResult = await authService.signUp({ name: 'nathan', email: email, password: password });
|
|
// expect(signUpResult.ok).toBeTruthy;
|
|
|
|
// const signInResult = await authService.signIn({ email: email, password: password });
|
|
// expect(signInResult.ok).toBeTruthy;
|
|
// });
|
|
|
|
// it('get user profile', async () => {
|
|
// const service = new AuthBackendService();
|
|
// const result = await service.autoSignUp();
|
|
// const userProfile = result.unwrap();
|
|
|
|
// const userService = new UserBackendService(userProfile.id);
|
|
// expect((await userService.getUserProfile()).unwrap()).toBe(userProfile);
|
|
// });
|
|
// });
|