Generate the browser contract from ProductApi
This commit is contained in:
parent
67cc0cb802
commit
c9642f4067
1 changed files with 2572 additions and 130 deletions
14
tests/web-contract.sh
Executable file
14
tests/web-contract.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
||||
|
||||
temporary="$(mktemp -d)"
|
||||
trap 'rm -rf "$temporary"' EXIT
|
||||
|
||||
cabal run nuthatch-generate-web-contract --offline -- \
|
||||
"$temporary/contract.ts" \
|
||||
"$temporary/contract.json"
|
||||
cmp web/src/generated/contract.ts "$temporary/contract.ts"
|
||||
cmp web/test/fixtures/contract.json "$temporary/contract.json"
|
||||
cabal run nuthatch-web-contract-integration --offline
|
||||
Loading…
Reference in a new issue