Skip to content

Commit 78a68ee

Browse files
committed
Update CHANGELOG
1 parent 82f4657 commit 78a68ee

37 files changed

Lines changed: 794 additions & 3033 deletions

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212

1313
### Pending Fixed
1414

15+
### v14.34.0 - 2025-04-13
16+
17+
- :arrow_up: Remove `tape` in favor of `node:test` for unit tests
18+
1519
### v14.33.0 - 2025-04-11
1620

1721
- :rocket: `creator.callsign` property is optional

package-lock.json

Lines changed: 206 additions & 2273 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,8 @@
5858
"devDependencies": {
5959
"@eslint/js": "^10.0.1",
6060
"@types/node": "^25.0.0",
61-
"@types/tape": "^5.6.0",
6261
"c8": "^11.0.0",
6362
"eslint": "^10.0.0",
64-
"tape": "^5.6.1",
6563
"tsx": "^4.20.3",
6664
"typedoc": "^0.28.0",
6765
"typescript": "^6.0.0",

test/2525.test.ts

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,80 @@
1-
import test from 'tape';
1+
import assert from 'node:assert/strict';
2+
import test from 'node:test';
23
import MilSymType, { StandardIdentity } from '../lib/utils/2525.js';
34

4-
test('2525 StandardIdentity', (t) => {
5-
t.equal(
5+
test('2525 StandardIdentity', () => {
6+
assert.equal(
67
MilSymType.standardIdentity('b-f-D'),
78
StandardIdentity.NONE
89
);
910

10-
t.equal(
11+
assert.equal(
1112
MilSymType.standardIdentity('a-'),
1213
StandardIdentity.NONE
1314
);
1415

15-
t.equal(
16+
assert.equal(
1617
MilSymType.standardIdentity('a-x-D-H'),
1718
StandardIdentity.NONE
1819
);
1920

20-
t.equal(
21+
assert.equal(
2122
MilSymType.standardIdentity('a-h-S'),
2223
StandardIdentity.HOSTILE
2324
);
24-
25-
t.end();
2625
});
2726

28-
test('2525 <=> SIDC to2525B', (t) => {
29-
t.equals("SHSPCLDD-------", MilSymType.to2525B("a-h-S-C-L-D-D"))
30-
t.equals("SFGPUCVRA------", MilSymType.to2525B("a-f-G-U-C-V-R-A"))
27+
test('2525 <=> SIDC to2525B', () => {
28+
assert.equal("SHSPCLDD-------", MilSymType.to2525B("a-h-S-C-L-D-D"))
29+
assert.equal("SFGPUCVRA------", MilSymType.to2525B("a-f-G-U-C-V-R-A"))
3130

32-
t.throws(() => {
31+
assert.throws(() => {
3332
MilSymType.to2525B("b-h-S-C-L-D-D")
3433
}, /CoT to 2525B can only be applied to well-formed Atom type CoT Events./);
3534

36-
t.throws(() => {
35+
assert.throws(() => {
3736
MilSymType.to2525B("")
3837
}, /CoT to 2525B can only be applied to well-formed Atom type CoT Events./);
3938

40-
t.throws(() => {
39+
assert.throws(() => {
4140
MilSymType.to2525B("bhSCLDD")
4241
}, /CoT to 2525B can only be applied to well-formed Atom type CoT Events./);
4342

44-
t.throws(() => {
43+
assert.throws(() => {
4544
MilSymType.to2525B("b-h-s-c-l-d-d")
4645
}, /CoT to 2525B can only be applied to well-formed Atom type CoT Events./);
4746

48-
t.throws(() => {
47+
assert.throws(() => {
4948
MilSymType.to2525B("b-h-S-?-L-D-D")
5049
}, /CoT to 2525B can only be applied to well-formed Atom type CoT Events./);
51-
52-
t.end();
5350
});
5451

55-
test('2525 <=> SIDC from2525B', (t) => {
52+
test('2525 <=> SIDC from2525B', () => {
5653

57-
t.equal("a-h-S-C-L-D-D", MilSymType.from2525B("SHSPCLDD-------"))
58-
t.equal("a-f-G-U-C-V-R-A", MilSymType.from2525B("SFGPUCVRA------"))
54+
assert.equal("a-h-S-C-L-D-D", MilSymType.from2525B("SHSPCLDD-------"))
55+
assert.equal("a-f-G-U-C-V-R-A", MilSymType.from2525B("SFGPUCVRA------"))
5956

60-
t.throws(() => {
57+
assert.throws(() => {
6158
MilSymType.from2525B("SFGPUCVRA")
6259
}, /2525B to CoT can only be applied to well-formed warfighting 2525B SIDCs./);
6360

64-
t.throws(() => {
61+
assert.throws(() => {
6562
MilSymType.from2525B("SOGPUCVRA------")
6663
}, /2525B to CoT can only be applied to well-formed warfighting 2525B SIDCs./);
6764

68-
t.throws(() => {
65+
assert.throws(() => {
6966
MilSymType.from2525B("SFMPUCVRA------")
7067
}, /2525B to CoT can only be applied to well-formed warfighting 2525B SIDCs./);
7168

72-
t.throws(() => {
69+
assert.throws(() => {
7370
MilSymType.from2525B("SFMPUCVRA------")
7471
}, /2525B to CoT can only be applied to well-formed warfighting 2525B SIDCs./);
7572

76-
t.throws(() => {
73+
assert.throws(() => {
7774
MilSymType.from2525B("SFGP*CVRA------")
7875
}, /2525B to CoT can only be applied to well-formed warfighting 2525B SIDCs./);
7976

80-
t.throws(() => {
77+
assert.throws(() => {
8178
MilSymType.from2525B("GFGPUCVRA------")
8279
}, /2525B to CoT can only be applied to well-formed warfighting 2525B SIDCs./);
83-
84-
85-
t.end();
8680
})

test/basemaps.test.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
import fs from 'node:fs/promises';
22
import path from 'node:path';
3-
import test from 'tape';
3+
import assert from 'node:assert/strict';
4+
import test from 'node:test';
45
import { Basemap } from '../index.js';
56
import { fileURLToPath } from 'node:url';
67

78
for (const fixturename of await fs.readdir(new URL('./basemaps/', import.meta.url))) {
8-
test(`Basemap Test: ${fixturename}`, async (t) => {
9+
test(`Basemap Test: ${fixturename}`, async () => {
910
const fixture = String(await fs.readFile(path.join(path.parse(fileURLToPath(import.meta.url)).dir, 'basemaps/', fixturename)));
1011
const container = await Basemap.parse(fixture);
1112

12-
t.ok(container.raw.customMapSource.name._text.length, 'Ensure raw xml name exists')
13+
assert.ok(container.raw.customMapSource.name._text.length, 'Ensure raw xml name exists')
1314

1415
const json = container.to_json();
15-
t.ok(json.name && json.name.length, 'Ensure JSON name exists');
16-
t.ok(json.url && json.url.length, 'Ensure JSON url exists');
17-
t.ok(typeof json.minZoom === 'number', 'Ensure JSON minZoom is a number');
18-
t.ok(typeof json.maxZoom === 'number', 'Ensure JSON maxZoom is a number');
19-
t.ok(typeof json.tileType === 'string' && json.tileType.length, 'Ensure JSON tileType is a string');
16+
assert.ok(json.name && json.name.length, 'Ensure JSON name exists');
17+
assert.ok(json.url && json.url.length, 'Ensure JSON url exists');
18+
assert.ok(typeof json.minZoom === 'number', 'Ensure JSON minZoom is a number');
19+
assert.ok(typeof json.maxZoom === 'number', 'Ensure JSON maxZoom is a number');
20+
assert.ok(typeof json.tileType === 'string' && json.tileType.length, 'Ensure JSON tileType is a string');
2021

21-
t.deepEqual(Object.keys(json), [
22+
assert.deepEqual(Object.keys(json), [
2223
'name',
2324
'url',
2425
'minZoom',
@@ -28,7 +29,5 @@ for (const fixturename of await fs.readdir(new URL('./basemaps/', import.meta.ur
2829
'backgroundColor',
2930
'serverParts'
3031
], 'Ensure JSON keys match expected structure')
31-
32-
t.end();
3332
});
3433
}

test/basic.test.ts

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import test from 'tape';
1+
import assert from 'node:assert/strict';
2+
import test from 'node:test';
23
import { CoTParser } from '../index.js';
34

4-
test('COT.callsign', async (t) => {
5+
test('COT.callsign', async () => {
56
const cot = await CoTParser.from_geojson({
67
"id": "123",
78
"type": "Feature",
@@ -22,14 +23,12 @@ test('COT.callsign', async (t) => {
2223
}
2324
});
2425

25-
t.equals(cot.callsign(), 'BasicTest');
26-
t.equals(cot.callsign('Reassign'), 'Reassign');
27-
t.equals(cot.callsign(), 'Reassign');
28-
29-
t.end();
26+
assert.equal(cot.callsign(), 'BasicTest');
27+
assert.equal(cot.callsign('Reassign'), 'Reassign');
28+
assert.equal(cot.callsign(), 'Reassign');
3029
});
3130

32-
test('COT.type', async (t) => {
31+
test('COT.type', async () => {
3332
const cot = await CoTParser.from_geojson({
3433
"id": "123",
3534
"type": "Feature",
@@ -50,14 +49,12 @@ test('COT.type', async (t) => {
5049
}
5150
});
5251

53-
t.equals(cot.type(), 'a-f-G');
54-
t.equals(cot.type('u-d-f'), 'u-d-f');
55-
t.equals(cot.type(), 'u-d-f');
56-
57-
t.end();
52+
assert.equal(cot.type(), 'a-f-G');
53+
assert.equal(cot.type('u-d-f'), 'u-d-f');
54+
assert.equal(cot.type(), 'u-d-f');
5855
});
5956

60-
test('COT.archived', async (t) => {
57+
test('COT.archived', async () => {
6158
const cot = await CoTParser.from_geojson({
6259
"id": "123",
6360
"type": "Feature",
@@ -78,17 +75,15 @@ test('COT.archived', async (t) => {
7875
}
7976
});
8077

81-
t.equals(cot.archived(), false);
82-
t.equals(cot.archived(true), true);
83-
84-
t.equals((await CoTParser.to_geojson(cot)).properties.archived, true)
78+
assert.equal(cot.archived(), false);
79+
assert.equal(cot.archived(true), true);
8580

86-
t.equals(cot.archived(), true);
87-
t.equals(cot.archived(false), false);
88-
t.equals(cot.archived(), false);
81+
assert.equal((await CoTParser.to_geojson(cot)).properties.archived, true)
8982

90-
t.equals((await CoTParser.to_geojson(cot)).properties.archived, undefined)
83+
assert.equal(cot.archived(), true);
84+
assert.equal(cot.archived(false), false);
85+
assert.equal(cot.archived(), false);
9186

92-
t.end();
87+
assert.equal((await CoTParser.to_geojson(cot)).properties.archived, undefined)
9388
});
9489

test/chat.test.ts

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import test from 'tape';
1+
import assert from 'node:assert/strict';
2+
import test from 'node:test';
23
import { DirectChat, MissionChat, CoTParser } from '../index.js';
34

4-
test('MissionChat - GeoJSON output', async (t) => {
5+
test('MissionChat - GeoJSON output', async () => {
56
const messageId = '6c19bcd5-c632-4c59-95e2-ae8c76c8feab';
67

78
const cot = new MissionChat({
@@ -32,7 +33,7 @@ test('MissionChat - GeoJSON output', async (t) => {
3233
cot.raw.event.point._attributes.lat = 39.078503;
3334
cot.raw.event.point._attributes.hae = 1393.296;
3435

35-
t.deepEquals(await CoTParser.to_geojson(cot), {
36+
assert.deepEqual(await CoTParser.to_geojson(cot), {
3637
id: `GeoChat.ANDROID-764679f74013dfe2.ops.cotak.gov-8443-ssl-Test Attachments.${messageId}`,
3738
type: 'Feature',
3839
path: '/',
@@ -73,11 +74,9 @@ test('MissionChat - GeoJSON output', async (t) => {
7374
coordinates: [ -108.537452, 39.078503, 1393.296 ]
7475
}
7576
});
76-
77-
t.end();
7877
});
7978

80-
test('DirectChat - Basic', (t) => {
79+
test('DirectChat - Basic', () => {
8180
const cot = new DirectChat({
8281
to: {
8382
uid: '123456',
@@ -90,36 +89,36 @@ test('DirectChat - Basic', (t) => {
9089
message: 'Direct Message Test'
9190
});
9291

93-
t.equals(cot.is_chat(), true);
92+
assert.equal(cot.is_chat(), true);
9493

95-
t.ok(cot.raw.event._attributes.uid);
94+
assert.ok(cot.raw.event._attributes.uid);
9695
cot.raw.event._attributes.uid = '123';
9796

9897
if (!cot.raw.event.detail) {
99-
t.fail('No Detail Section')
98+
assert.fail('No Detail Section')
10099
} else {
101-
t.equals(typeof cot.raw.event._attributes.time, 'string');
100+
assert.equal(typeof cot.raw.event._attributes.time, 'string');
102101
cot.raw.event._attributes.time = '2024-04-01'
103-
t.equals(typeof cot.raw.event._attributes.start, 'string');
102+
assert.equal(typeof cot.raw.event._attributes.start, 'string');
104103
cot.raw.event._attributes.start = '2024-04-01'
105-
t.equals(typeof cot.raw.event._attributes.stale, 'string');
104+
assert.equal(typeof cot.raw.event._attributes.stale, 'string');
106105
cot.raw.event._attributes.stale = '2024-04-01'
107106

108107
if (!cot.raw.event.detail.__chat) {
109-
t.fail('No Chat Section')
108+
assert.fail('No Chat Section')
110109
} else {
111-
t.equals(typeof cot.raw.event.detail.__chat._attributes.messageId, 'string');
110+
assert.equal(typeof cot.raw.event.detail.__chat._attributes.messageId, 'string');
112111
cot.raw.event.detail.__chat._attributes.messageId = '123';
113112
}
114113

115114
if (!cot.raw.event.detail.remarks || !cot.raw.event.detail.remarks._attributes) {
116-
t.fail('No Remarks Section')
115+
assert.fail('No Remarks Section')
117116
} else {
118-
t.equals(typeof cot.raw.event.detail.remarks._attributes.time, 'string');
117+
assert.equal(typeof cot.raw.event.detail.remarks._attributes.time, 'string');
119118
cot.raw.event.detail.remarks._attributes.time = '123';
120119
}
121120

122-
t.deepEquals(cot.raw, {
121+
assert.deepEqual(cot.raw, {
123122
event: {
124123
_attributes: {
125124
uid: '123',
@@ -178,6 +177,4 @@ test('DirectChat - Basic', (t) => {
178177
}
179178
});
180179
}
181-
182-
t.end();
183180
});

0 commit comments

Comments
 (0)