Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: convert toEqual into toBe #46

Merged
merged 1 commit into from
May 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();
});
});