Skip to content

Commit

Permalink
test: crush with dot in property name
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Jun 26, 2024
1 parent 23e8a1e commit e789c1f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/object/tests/crush.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,12 @@ describe('crush function', () => {
timestamp: now
})
})
test('handles property names with dots', () => {
const obj = {
a: { 'b.c': 'value' }
}
expect(_.crush(obj)).toEqual({

Check failure on line 40 in src/object/tests/crush.test.ts

View workflow job for this annotation

GitHub Actions / Test (18.x)

src/object/tests/crush.test.ts > crush function > handles property names with dots

AssertionError: expected { 'a.b.c': undefined } to deeply equal { 'a.b.c': 'value' } - Expected + Received Object { - "a.b.c": "value", + "a.b.c": undefined, } ❯ src/object/tests/crush.test.ts:40:26

Check failure on line 40 in src/object/tests/crush.test.ts

View workflow job for this annotation

GitHub Actions / Test (20.x)

src/object/tests/crush.test.ts > crush function > handles property names with dots

AssertionError: expected { 'a.b.c': undefined } to deeply equal { 'a.b.c': 'value' } - Expected + Received Object { - "a.b.c": "value", + "a.b.c": undefined, } ❯ src/object/tests/crush.test.ts:40:26

Check failure on line 40 in src/object/tests/crush.test.ts

View workflow job for this annotation

GitHub Actions / Test (22.x)

src/object/tests/crush.test.ts > crush function > handles property names with dots

AssertionError: expected { 'a.b.c': undefined } to deeply equal { 'a.b.c': 'value' } - Expected + Received Object { - "a.b.c": "value", + "a.b.c": undefined, } ❯ src/object/tests/crush.test.ts:40:26
'a.b.c': 'value'
})
})
})

0 comments on commit e789c1f

Please sign in to comment.