Skip to content

Commit

Permalink
add test for PR #21
Browse files Browse the repository at this point in the history
  • Loading branch information
doowb committed Apr 1, 2020
1 parent 236f797 commit dbce32f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ describe('escaping', function() {
set(obj2, 'e\\.f.g\\.h\\.i.j', 1, { escape: true });
assert.deepEqual(obj2, { 'e.f': { 'g.h.i': { j: 1 } } });
});

it('should work with escaped dots as the last character', function() {
var o = {};
set(o, 'a\\.b.c.d\\.e\\.', 'c', { escape: true });
assert.equal(o['a.b'].c['d.e.'], 'c');
});
});

describe('options', function() {
Expand Down

0 comments on commit dbce32f

Please sign in to comment.