The gate runs the tests compiled to JavaScript too

tool/check.sh runs dart test -p node after dart test: the tests that read
no file check on every commit that the integers of the library are exact
on the web, where an int is a double and the bit operators work on 32 bits.
The gate needs Node.js, as datekeys-ts does. The author decided it on 5
October.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.11
dev 2 days ago
parent 10b0895c0b
commit c8bf3c0eab

@ -4,6 +4,10 @@ Cambios notables de la librería Dart. El proyecto usa versionado semántico; mi
## Especificación 0.11, en la rama `v0.11` — sin versión
### El gate con Node.js (05-10-2026)
- `tool/check.sh` corre también `dart test -p node`: las pruebas que no leen ficheros, compiladas a JavaScript, comprueban en cada commit que los enteros son exactos en la web. Lo decidió el autor.
### Etapa 1: errores, bytes, CBOR y DER (05-10-2026)
- **Errores normativos (§69).** `ErrorCode` con los 19 códigos en el orden del spec y `DateKeysException`, con el mensaje `contexto: CÓDIGO` de Go. `wrap` y `withContext` hacen lo que `fmt.Errorf("prefijo: %w")`, y `errorCode` lo que `datekeys.Code`. Una prueba compara el catálogo con las líneas `ERR_` del §69, leído de `datekeys-go` en el tag `spec-v0.11`.

@ -67,16 +67,9 @@ tool/check.sh
- el formato;
- `dart analyze --fatal-infos`;
- `dart test`;
- `dart test -p node`: las pruebas que no leen ficheros corren también compiladas a JavaScript, en Node.js, para comprobar que los enteros son exactos en la web. Las que leen ficheros llevan `@TestOn('vm')`. Por eso el gate necesita Node.js, como `datekeys-ts`; lo decidió el autor el 5 de octubre de 2026;
- la copia de `testdata/` frente al repositorio de Go, que debe estar al lado, en `../datekeys-go`.
Las pruebas que no leen ficheros corren también compiladas a JavaScript, en Node.js. Así se comprueba que los enteros son exactos en la web. No forman parte del gate:
```bash
dart test -p node
```
Las que leen ficheros llevan `@TestOn('vm')`.
## Datos de prueba
`testdata/` es una copia de `datekeys-go/testdata` en un commit fijo. `testdata/SOURCE.json` registra el commit y el SHA-256 de cada fichero, igual que en `datekeys-ts`. La copia actual es la del tag `spec-v0.11` (`ae33434`).

@ -1,7 +1,8 @@
#!/usr/bin/env bash
# Local gate of datekeys-dart, as scripts/check.sh of datekeys-go and npm run
# verify of datekeys-ts: format, analysis, tests, and the copy of testdata/
# against the Go repository next to this one. Run it before every commit.
# verify of datekeys-ts: format, analysis, tests on the VM and compiled to
# JavaScript, and the copy of testdata/ against the Go repository next to this
# one. Run it before every commit. It needs Node.js, as datekeys-ts does.
#
# tool/check.sh
set -euo pipefail
@ -16,6 +17,12 @@ dart analyze --fatal-infos
echo "== dart test"
dart test
# The integers of the library must be exact on the web too, where an int is
# a double and the bit operators work on 32 bits: the tests that read no file
# run again compiled to JavaScript (the others are @TestOn('vm')).
echo "== dart test -p node"
dart test -p node
echo "== testdata against datekeys-go"
dart run tool/sync_testdata.dart check --against ../datekeys-go

Loading…
Cancel
Save

Powered by TurnKey Linux.