From c8c36b4b42f4aba7ffc652dc4071f65878c34aa8 Mon Sep 17 00:00:00 2001 From: ingalls Date: Fri, 30 Aug 2024 11:08:48 -0600 Subject: [PATCH] Add Callsign Test --- api/test/style.test.ts | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/api/test/style.test.ts b/api/test/style.test.ts index 994ff111c..2d77fd09a 100644 --- a/api/test/style.test.ts +++ b/api/test/style.test.ts @@ -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,