create-arxo 0.1.1 → 0.2.0
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/package.json
CHANGED
package/template/package.json
CHANGED
|
@@ -2,13 +2,25 @@ import assert from 'node:assert/strict';
|
|
|
2
2
|
import test from 'node:test';
|
|
3
3
|
import { open } from '@arxo/law';
|
|
4
4
|
|
|
5
|
-
test('opens the bundled canon', async () => {
|
|
5
|
+
test('opens the bundled canon and asks one question', async () => {
|
|
6
6
|
const wasmPath = process.env.ARXO_WASM;
|
|
7
|
-
const
|
|
7
|
+
const fristen = await open('de.bgb.fristen@0.1.0', {
|
|
8
8
|
offline: true,
|
|
9
9
|
...(wasmPath ? { wasmPath } : {}),
|
|
10
10
|
});
|
|
11
|
-
assert.equal(
|
|
12
|
-
|
|
11
|
+
assert.equal(fristen.name, 'de.bgb.fristen');
|
|
12
|
+
// 14 days from 6 March 2026, § 187 (1) and § 188 (1) BGB: does the period end on 20 March?
|
|
13
|
+
const r = await fristen.truth('frist_ende', ['frist', '2026-03-20'], {
|
|
14
|
+
legalTime: '2026-09-17',
|
|
15
|
+
timezone: 'Europe/Berlin',
|
|
16
|
+
deadlinePolicy: 'urn:de:corpus:clir:bgb-fristen#BGB_FRISTEN_TAG',
|
|
17
|
+
answers: [
|
|
18
|
+
{ predicate: 'frist_ereignis', args: ['frist', '2026-03-06'] },
|
|
19
|
+
{ predicate: 'frist_dauer_tage', args: ['frist', '14 calendar_day'] },
|
|
20
|
+
],
|
|
21
|
+
});
|
|
13
22
|
assert.equal(r.via, 'local');
|
|
23
|
+
assert.equal(r.evaluationStatus, 'COMPUTED');
|
|
24
|
+
assert.equal(r.truthStatus, 'TRUE_ONLY');
|
|
25
|
+
assert.ok(r.document.byteLength > 0, 'the evaluation document is attached');
|
|
14
26
|
});
|