Skip to content

Commit

Permalink
add a test for encoding null property
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed May 19, 2021
1 parent e07afa4 commit 285b4d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ test('property encoding', function (t) {
a: 'one',
b: 1,
c: { hello: 'world' },
d: [1, 2, 3]
d: [1, 2, 3],
e: null
},
geometry: {
type: 'Point',
Expand Down Expand Up @@ -54,6 +55,7 @@ test('property encoding', function (t) {
var second = layer.feature(1).properties
t.same(first.c, '{"hello":"world"}')
t.same(first.d, '[1,2,3]')
t.equals(first.e, null)
t.same(second.c, '{"goodbye":"planet"}')
t.same(second.d, '{"hello":"world"}')
t.end()
Expand Down

0 comments on commit 285b4d0

Please sign in to comment.