@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 +4 -0
- package/dist/package.json +1 -1
- package/dist/test/validation.test.js +18 -0
- package/dist/test/validation.test.js.map +1 -0
- package/package.json +1 -1
- package/test/validation.test.ts +20 -0
package/CHANGELOG.md
CHANGED
package/dist/package.json
CHANGED
|
@@ -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
|
@@ -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
|
+
});
|