Skip to content

Commit

Permalink
Clean user instance for each test
Browse files Browse the repository at this point in the history
  • Loading branch information
flopez7 committed Mar 4, 2025
1 parent cb6c9a0 commit 14e1dd7
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,17 @@ describe('NDAService', () => {
});

describe('signNDA', () => {
let user: Pick<UserEntity, 'id' | 'email' | 'ndaSignedUrl'>;
beforeEach(async () => {
user = {
id: faker.number.int(),
email: faker.internet.email(),
ndaSignedUrl: undefined,
};
});
const nda: NDASignatureDto = {
url: validNdaUrl,
};
const user: Pick<UserEntity, 'id' | 'email' | 'ndaSignedUrl'> = {
id: faker.number.int(),
email: faker.internet.email(),
ndaSignedUrl: undefined,
};

it('should sign the NDA if the URL is valid and the user has not signed it yet', async () => {
await service.signNDA(user as any, nda);
Expand Down

0 comments on commit 14e1dd7

Please sign in to comment.