noir-testing
Test Noir circuits using nargo test. Covers test attributes, assertions, and organization patterns.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Test Noir circuits using nargo test. Covers test attributes, assertions, and organization patterns.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | noir-testing |
| description | Test Noir circuits using nargo test. Covers test attributes, assertions, and organization patterns. |
| allowed-tools | Read, Grep, Glob, Edit, Write, Bash |
Noir has a built-in test framework that runs alongside your circuit code using nargo test. Tests are constrained by default, meaning they generate real constraints and verify circuit behavior under proving conditions.
.nr files as circuit code, or in separate test modulesunconstrained to run tests without constraint generation (faster, but less thorough)nargo# Run all tests in the project
nargo test
# Run a specific test by exact name
nargo test --exact test_addition
# Run tests matching a prefix
nargo test test_transfer
# Show println output during tests
nargo test --show-output
fn add(x: Field, y: Field) -> Field {
x + y
}
#[test]
fn test_add() {
assert_eq(add(2, 3), 5);
}
#[test(should_fail_with = "attempt to divide by zero")]
fn test_divide_by_zero() {
let _ = 1 / 0;
}
#[test]
unconstrained fn test_add_unconstrained() {
// Runs faster without constraint generation
assert_eq(add(2, 3), 5);
}
#[test], should_fail, constrained vs unconstrainedassert, assert_eq, debugging with printlnPatterns for Noir circuit development: data types, stdlib, workspace setup. Use when working with Noir circuits in any capacity unless otherwise specified
Guidelines for writing idiomatic, efficient Noir programs. Use when writing or reviewing Noir code.
JavaScript/TypeScript integration with Noir circuits. Covers compilation, witness generation, proving, and verification using noir_js and bb.js.
Workflow for measuring and optimizing the ACIR circuit size of a constrained Noir program. Use when asked to optimize a Noir program's gate count or circuit size.
Review Noir circuits for correctness, constraint efficiency, and proof soundness. Use proactively after writing or modifying Noir circuits.
Web integration for Noir circuits. Covers React integration, Web Worker proving, WASM setup, and UX patterns for browser-based ZK applications.