Skip to content

Commit

Permalink
test: convert toEqual into toBe (#46)
Browse files Browse the repository at this point in the history
Signed-off-by: Yokozuna59 <u.yokozuna@gmail.com>
  • Loading branch information
Yokozuna59 authored May 20, 2023
1 parent b1e0ec7 commit a271f62
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions packages/mermaid-parser/tests/common/accessible.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('when parsing accTitle', () => {
const value = result.value;
expect(value.title).toBeUndefined();
expect(value.accDescr).toBeUndefined();
expect(value.accTitle).toEqual('sample accessibility');
expect(value.accTitle).toBe('sample accessibility');
});

// it('should handle valid accTitle with title', async () => {
Expand All @@ -86,7 +86,7 @@ describe('when parsing accTitle', () => {
// const value = result.value;
// expect(value.title).toBeUndefined();
// expect(value.accDescr).toBeUndefined();
// expect(value.accTitle).toEqual('sample accessibility + title test');
// expect(value.accTitle).toBe('sample accessibility + title test');
// });

// it('should handle valid accTitle with accDescr', async () => {
Expand All @@ -98,7 +98,7 @@ describe('when parsing accTitle', () => {
// const value = result.value;
// expect(value.title).toBeUndefined();
// expect(value.accDescr).toBeUndefined();
// expect(value.accTitle).toEqual('sample description + accDescr: test');
// expect(value.accTitle).toBe('sample description + accDescr: test');
// });
});

Expand Down Expand Up @@ -168,7 +168,7 @@ describe('when parsing accDescr', () => {

const value = result.value;
expect(value.title).toBeUndefined();
expect(value.accDescr).toEqual('sample single line description');
expect(value.accDescr).toBe('sample single line description');
expect(value.accTitle).toBeUndefined();
});

Expand All @@ -180,7 +180,7 @@ describe('when parsing accDescr', () => {

// const value = result.value;
// expect(value.title).toBeUndefined();
// expect(value.accDescr).toEqual('sample description + title test');
// expect(value.accDescr).toBe('sample description + title test');
// expect(value.accTitle).toBeUndefined();
// });

Expand All @@ -192,7 +192,7 @@ describe('when parsing accDescr', () => {

const value = result.value;
expect(value.title).toBeUndefined();
expect(value.accDescr).toEqual('sample description + accTitle: test');
expect(value.accDescr).toBe('sample description + accTitle: test');
expect(value.accTitle).toBeUndefined();
});

Expand Down Expand Up @@ -263,9 +263,7 @@ describe('when parsing accDescr', () => {

const value = result.value;
expect(value.title).toBeUndefined();
expect(value.accDescr).toEqual(
'sample multi line description\nnewline',
);
expect(value.accDescr).toBe('sample multi line description\nnewline');
expect(value.accTitle).toBeUndefined();
});

Expand All @@ -280,7 +278,7 @@ describe('when parsing accDescr', () => {

// const value = result.value;
// expect(value.title).toBeUndefined();
// expect(value.accDescr).toEqual('sample description +\ntitle test');
// expect(value.accDescr).toBe('sample description +\ntitle test');
// expect(value.accTitle).toBeUndefined();
// });

Expand All @@ -295,7 +293,7 @@ describe('when parsing accDescr', () => {

const value = result.value;
expect(value.title).toBeUndefined();
expect(value.accDescr).toEqual('sample description +\naccTitle: test');
expect(value.accDescr).toBe('sample description +\naccTitle: test');
expect(value.accTitle).toBeUndefined();
});
});

0 comments on commit a271f62

Please sign in to comment.