@tak-ps/node-cot 10.12.0 → 10.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,10 @@
10
10
 
11
11
  ## Version History
12
12
 
13
+ ### v10.12.1 - 2024-08-12
14
+
15
+ - :white_check_mark: Add validation tests to ensure validation takes place
16
+
13
17
  ### v10.12.0 - 2024-08-12
14
18
 
15
19
  - :data: Add `ForceDelete` helper class
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tak-ps/node-cot",
3
3
  "type": "module",
4
- "version": "10.12.0",
4
+ "version": "10.12.1",
5
5
  "description": "Lightweight JavaScript library for parsing and manipulating TAK messages",
6
6
  "author": "Nick Ingalls <nick@ingalls.ca>",
7
7
  "main": "dist/index.js",
@@ -0,0 +1,18 @@
1
+ import test from 'tape';
2
+ import CoT from '../index.js';
3
+ test('CoT.from_geojson - Point', (t) => {
4
+ try {
5
+ new CoT({
6
+ event: {
7
+ // @ts-expect-error we're trying to force an error here
8
+ _attributes: {}
9
+ }
10
+ });
11
+ t.fail();
12
+ }
13
+ catch (err) {
14
+ t.ok(String(err).includes('must have required property'));
15
+ }
16
+ t.end();
17
+ });
18
+ //# sourceMappingURL=validation.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.test.js","sourceRoot":"","sources":["../../test/validation.test.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,GAAG,MAAM,aAAa,CAAC;AAE9B,IAAI,CAAC,0BAA0B,EAAE,CAAC,CAAC,EAAE,EAAE;IACnC,IAAI,CAAC;QACD,IAAI,GAAG,CACH;YACI,KAAK,EAAE;gBACP,uDAAuD;gBACnD,WAAW,EAAE,EAAE;aAClB;SACJ,CACJ,CAAC;QACF,CAAC,CAAC,IAAI,EAAE,CAAC;IACb,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACX,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,6BAA6B,CAAC,CAAC,CAAC;IAC9D,CAAC;IAED,CAAC,CAAC,GAAG,EAAE,CAAC;AACZ,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tak-ps/node-cot",
3
3
  "type": "module",
4
- "version": "10.12.0",
4
+ "version": "10.12.1",
5
5
  "description": "Lightweight JavaScript library for parsing and manipulating TAK messages",
6
6
  "author": "Nick Ingalls <nick@ingalls.ca>",
7
7
  "main": "dist/index.js",
@@ -0,0 +1,20 @@
1
+ import test from 'tape';
2
+ import CoT from '../index.js';
3
+
4
+ test('CoT.from_geojson - Point', (t) => {
5
+ try {
6
+ new CoT(
7
+ {
8
+ event: {
9
+ // @ts-expect-error we're trying to force an error here
10
+ _attributes: {}
11
+ }
12
+ }
13
+ );
14
+ t.fail();
15
+ } catch (err) {
16
+ t.ok(String(err).includes('must have required property'));
17
+ }
18
+
19
+ t.end();
20
+ });