Skip to content

Commit c30f78a

Browse files
author
Evan Greer
committed
feat: adds unit tests for IterableEmbeddedMessageText
1 parent 0d4b4b3 commit c30f78a

1 file changed

Lines changed: 3 additions & 14 deletions

File tree

src/__tests__/IterableEmbeddedMessageText.test.ts

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,7 @@ describe('IterableEmbeddedMessageText', () => {
55
it('should create an instance from a dictionary with all properties', () => {
66
Iterable.logger.log('iterableEmbeddedMessageText_fromDict_all_properties');
77

8-
const dict = {
9-
id: 'text-123',
10-
text: 'Hello World!',
11-
type: 'heading',
12-
};
13-
8+
const dict = { id: 'text-123', text: 'Hello World!', type: 'heading' };
149
const text = IterableEmbeddedMessageText.fromDict(dict);
1510

1611
expect(text).toBeInstanceOf(IterableEmbeddedMessageText);
@@ -22,10 +17,7 @@ describe('IterableEmbeddedMessageText', () => {
2217
it('should create an instance from a dictionary with only required properties', () => {
2318
Iterable.logger.log('iterableEmbeddedMessageText_fromDict_required_only');
2419

25-
const dict = {
26-
id: 'text-123',
27-
};
28-
20+
const dict = { id: 'text-123' };
2921
const text = IterableEmbeddedMessageText.fromDict(dict);
3022

3123
expect(text).toBeInstanceOf(IterableEmbeddedMessageText);
@@ -37,10 +29,7 @@ describe('IterableEmbeddedMessageText', () => {
3729
it('should throw an error if id is missing in fromDict', () => {
3830
Iterable.logger.log('iterableEmbeddedMessageText_fromDict_missing_id');
3931

40-
const dict = {
41-
text: 'Hello World!',
42-
type: 'heading',
43-
};
32+
const dict = { text: 'Hello World!', type: 'heading' };
4433

4534
expect(() => IterableEmbeddedMessageText.fromDict(dict)).toThrow(
4635
'id is required'

0 commit comments

Comments
 (0)