Add TypeScript unit test suite for the Push3 transpiler using Node's built-in test runner (node:test) with tsx. 47 tests across 12 suites covering parser, stack underflow/overflow, EXEC.IF balanced/unbalanced/ nested branching, arithmetic, boolean ops, name binding, and integration. Update CI to run `npm test` (which now includes unit tests + existing bash tests) and scope transpiler-tests step to only trigger on changes to tools/push3-transpiler/**. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
18 lines
482 B
JSON
18 lines
482 B
JSON
{
|
|
"name": "push3-transpiler",
|
|
"version": "1.0.0",
|
|
"description": "Push3 to Solidity transpiler for OptimizerV3",
|
|
"type": "module",
|
|
"main": "dist/index.js",
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"transpile": "tsx src/index.ts",
|
|
"test": "tsx --test test/*.test.ts && bash test_inject_extraction.sh && bash test_transpiler_clamping.sh"
|
|
},
|
|
"dependencies": {},
|
|
"devDependencies": {
|
|
"typescript": "^5.0.0",
|
|
"tsx": "^4.0.0",
|
|
"@types/node": "^20.0.0"
|
|
}
|
|
}
|