@tomei/sso 0.8.10 → 0.8.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/.prettierrc +2 -3
  2. package/Jenkinsfile +1 -1
  3. package/__tests__/unit/components/login-user/login-user.spec.ts +734 -731
  4. package/__tests__/unit/components/password-hash/password-hash.service.spec.ts +26 -26
  5. package/dist/__tests__/unit/components/login-user/login-user.spec.d.ts +1 -0
  6. package/dist/__tests__/unit/components/login-user/login-user.spec.js +652 -0
  7. package/dist/__tests__/unit/components/login-user/login-user.spec.js.map +1 -1
  8. package/dist/__tests__/unit/components/password-hash/password-hash.service.spec.d.ts +1 -0
  9. package/dist/__tests__/unit/components/password-hash/password-hash.service.spec.js +37 -0
  10. package/dist/__tests__/unit/components/password-hash/password-hash.service.spec.js.map +1 -1
  11. package/dist/src/components/login-user/login-user.d.ts +4 -4
  12. package/dist/src/components/login-user/login-user.js +15 -13
  13. package/dist/src/components/login-user/login-user.js.map +1 -1
  14. package/dist/tsconfig.tsbuildinfo +1 -1
  15. package/jest.config.js +0 -1
  16. package/package.json +3 -3
  17. package/src/components/login-user/login-user.ts +10 -10
  18. package/__tests__/unit/components/login-history/login-history.repository.spec.ts +0 -95
  19. package/__tests__/unit/components/login-user/user.repository.spec.ts +0 -81
  20. package/__tests__/unit/components/system/system.repository.spec.ts +0 -88
  21. package/__tests__/unit/components/system-access/system-access.repository.spec.ts +0 -78
  22. package/dist/__tests__/unit/components/login-history/login-history.repository.spec.d.ts +0 -0
  23. package/dist/__tests__/unit/components/login-history/login-history.repository.spec.js +0 -1
  24. package/dist/__tests__/unit/components/login-history/login-history.repository.spec.js.map +0 -1
  25. package/dist/__tests__/unit/components/login-user/user.repository.spec.d.ts +0 -0
  26. package/dist/__tests__/unit/components/login-user/user.repository.spec.js +0 -1
  27. package/dist/__tests__/unit/components/login-user/user.repository.spec.js.map +0 -1
  28. package/dist/__tests__/unit/components/system/system.repository.spec.d.ts +0 -0
  29. package/dist/__tests__/unit/components/system/system.repository.spec.js +0 -1
  30. package/dist/__tests__/unit/components/system/system.repository.spec.js.map +0 -1
  31. package/dist/__tests__/unit/components/system-access/system-access.repository.spec.d.ts +0 -0
  32. package/dist/__tests__/unit/components/system-access/system-access.repository.spec.js +0 -1
  33. package/dist/__tests__/unit/components/system-access/system-access.repository.spec.js.map +0 -1
@@ -1,32 +1,32 @@
1
- // import { PasswordHashService } from "../../../../src/components/password-hash/password-hash.service";
1
+ import { PasswordHashService } from "../../../../src/components/password-hash/password-hash.service";
2
2
 
3
- // jest.mock('argon2', () => {
4
- // return {
5
- // hash: jest.fn((passowrd) => {
6
- // return `hash${passowrd}`;
7
- // }),
8
- // verify: jest.fn().mockResolvedValue(true)
9
- // }
10
- // })
3
+ jest.mock('argon2', () => {
4
+ return {
5
+ hash: jest.fn((passowrd) => {
6
+ return `hash${passowrd}`;
7
+ }),
8
+ verify: jest.fn().mockResolvedValue(true)
9
+ }
10
+ })
11
11
 
12
- // describe('password-hash.service', () => {
13
- // const passwordHashService = new PasswordHashService();
14
- // afterEach(() => {
15
- // jest.clearAllMocks();
16
- // });
12
+ describe('password-hash.service', () => {
13
+ const passwordHashService = new PasswordHashService();
14
+ afterEach(() => {
15
+ jest.clearAllMocks();
16
+ });
17
17
 
18
- // it('should return hash password', async () => {
19
- // const password = 'password';
20
- // const hash = await passwordHashService.hashPassword(password);
21
- // expect(hash).toEqual('hashpassword');
22
- // })
18
+ it('should return hash password', async () => {
19
+ const password = 'password';
20
+ const hash = await passwordHashService.hashPassword(password);
21
+ expect(hash).toEqual('hashpassword');
22
+ })
23
23
 
24
- // it('should return true when verify password', async () => {
25
- // const password = 'password';
26
- // const hash = 'hashpassword10';
27
- // const result = await passwordHashService.verify(password, hash);
28
- // expect(result).toEqual(true);
29
- // });
24
+ it('should return true when verify password', async () => {
25
+ const password = 'password';
26
+ const hash = 'hashpassword10';
27
+ const result = await passwordHashService.verify(password, hash);
28
+ expect(result).toEqual(true);
29
+ });
30
30
 
31
31
 
32
- // })
32
+ })