["test:integration:stack-auth"]
description = "Run stack-auth Node.js integration tests"
dir = "{{config_root}}/packages/stack-auth/node"
run = [
"npm install",
"cargo build -p stack-auth-node --features stack-auth-node/test-utils",
"cp ../../../target/debug/libstack_auth_node.dylib stack-auth-node.node 2>/dev/null || cp ../../../target/debug/libstack_auth_node.so stack-auth-node.node",
"npx vitest run",
]
["crap:stack-auth"]
description = "Report the CRAP (Change Risk Anti-Patterns) metric for stack-auth — flags complex, under-tested functions"
run = [
"mise x --env test -- cargo llvm-cov nextest -p stack-auth --all-features -E 'not test(stress_tests)' --lcov --output-path {{config_root}}/target/stack-auth-lcov.info",
"cargo crap --path packages/stack-auth --lcov {{config_root}}/target/stack-auth-lcov.info --exclude 'node/**' --exclude 'wasm/**' --exclude 'examples/**' --exclude '**/tests.rs' --exclude '**/tests/**'",
]