Skip to content

Commit 85b0fb3

Browse files
committed
update test case names
1 parent b9baa13 commit 85b0fb3

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

packages/core/test/lib/utils/object.test.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -145,29 +145,22 @@ describe('extractExceptionKeysForMessage()', () => {
145145
expect(extractExceptionKeysForMessage({})).toEqual('[object has no keys]');
146146
});
147147

148-
test('one key should be returned as a whole if not over the length limit', () => {
148+
test('one key should be returned as a whole', () => {
149149
expect(extractExceptionKeysForMessage({ foo: '_' })).toEqual('foo');
150150
expect(extractExceptionKeysForMessage({ foobarbazx: '_' })).toEqual('foobarbazx');
151151
});
152152

153-
test('multiple keys should be sorted and joined as a whole if not over the length limit', () => {
154-
expect(extractExceptionKeysForMessage({ foo: '_', bar: '_', baz: '_' })).toEqual('bar, baz, foo');
155-
});
156-
157-
test('multiple keys should truncate first key if its too long', () => {
158-
expect(extractExceptionKeysForMessage({ barbazquxfoo: '_', baz: '_', qux: '_' })).toEqual('barbazquxfoo, baz, qux');
159-
});
160-
161-
test('sorts keys alphabetically and does not truncate multiple keys or long keys', () => {
153+
test('multiple keys should be sorted and joined as a whole (without truncating)', () => {
162154
const exception = {
163155
property1: 'a',
164156
thisIsAnExtremelyLongPropertyNameThatExceedsFortyCharacters: 'b',
157+
barbazquxfooabc: 'x',
165158
property3: 'c',
166159
property4: 'd',
167160
property5: 'e',
168161
};
169162
expect(extractExceptionKeysForMessage(exception)).toEqual(
170-
'property1, property3, property4, property5, thisIsAnExtremelyLongPropertyNameThatExceedsFortyCharacters',
163+
'barbazquxfooabc, property1, property3, property4, property5, thisIsAnExtremelyLongPropertyNameThatExceedsFortyCharacters',
171164
);
172165
});
173166
});

0 commit comments

Comments
 (0)