Skip to content

Commit

Permalink
changed test names
Browse files Browse the repository at this point in the history
  • Loading branch information
crisnicandrei committed Feb 5, 2024
1 parent 1c6868e commit 06c3642
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/app/shared/services/profile/profile.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe('ProfileService', () => {
expect(instance).toBeTruthy();
});

it('should return the correct completion value', async () => {
it('should return the correct completion value when not all the fields have a value', async () => {
const mockDictionary = {
birth_info: [
{
Expand All @@ -86,8 +86,7 @@ describe('ProfileService', () => {
],
description: [
{
textData1:
'Description descripoton Description descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDes',
textData1: 'Description',
},
],
email: [
Expand Down Expand Up @@ -131,7 +130,7 @@ describe('ProfileService', () => {
expect(progress).toBe(0.8);
});

it('should return the correct completion value', async () => {
it('should 1 when at least one of each profile category has a value', async () => {
const mockDictionary = {
birth_info: [
{
Expand All @@ -141,8 +140,7 @@ describe('ProfileService', () => {
],
description: [
{
textData1:
'Description descripoton Description descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDescription descripotonDes',
textData1: 'Description',
},
],
email: [
Expand Down Expand Up @@ -187,7 +185,7 @@ describe('ProfileService', () => {
expect(progress).toBe(1);
});

it('should return the correct completion value', async () => {
it('should return 0 when no fields have any values', async () => {
const mockDictionary = {};
const { instance } = await shallow.createService();
(instance as any).profileItemDictionary = mockDictionary;
Expand Down

0 comments on commit 06c3642

Please sign in to comment.