0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00
logto/packages/integration-tests/tests/session.test.ts
simeng-li 939dc0eac8
refactor(test): refactor logto client and actions (#1691)
* refactor(test): refactor logto client and actions

refactor logto client and related actions

* chore(test): rename LogtoClient class

rename LogtoClient class

* refactor(test): rename client and client methods

rename client and client methods

* refactor(test): cr fix

cr fix

* refactor(test): reuse helpers

reuser helpers
2022-07-28 10:13:21 +08:00

15 lines
517 B
TypeScript

import { registerNewUser, signIn } from '@/helpers';
import { generateUsername, generatePassword } from '@/utils';
describe('username and password flow', () => {
const username = generateUsername();
const password = generatePassword();
it('register with username & password', async () => {
await expect(registerNewUser(username, password)).resolves.not.toThrow();
});
it('sign-in with username & password', async () => {
await expect(signIn(username, password)).resolves.not.toThrow();
});
});