Skip to content

Commit

Permalink
Add Callsign Test
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Aug 30, 2024
1 parent e579b85 commit c8c36b4
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions api/test/style.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,43 @@ test('Style: Basic Point: Disabled', async () => {
});
});

test('Style: Basic Callsign', async () => {
const style = new Style({
stale: 123,
enabled_styles: true,
styles: {
point: {
'marker-color': '#ffffff',
remarks: 'Test Remarks'
}
}
});

assert.deepEqual(await style.feat({
type: 'Feature',
properties: {
callsign: 'CallSign Test'
},
geometry: {
type: 'Point',
coordinates: [0, 0]
}
}), {
type: 'Feature',
properties: {
callsign: 'CallSign Test',
'marker-color': '#ffffff',
remarks: 'Test Remarks',
metadata: {},
stale: 123000
},
geometry: {
type: 'Point',
coordinates: [0, 0]
}
});
});

test('Style: Basic Point: Stale only applied if stale is undefined on root feature', async () => {
const style = new Style({
stale: 123,
Expand Down

0 comments on commit c8c36b4

Please sign in to comment.