Skip to content

Commit

Permalink
chore: vc-test-suite support
Browse files Browse the repository at this point in the history
  • Loading branch information
Nebulis committed Dec 7, 2020
1 parent 83ca301 commit f44c5bd
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
coverage
dist
src/__generated__
vc-test-suite
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ yarn.lock
/.idea
*.iml
/public
/vc-test-suite
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"test": "npm run build && jest",
"test:coverage": "jest --coverage",
"test:watch": "jest --watch",
"test:vc": "./scripts/test.sh",
"lint": "eslint . --ext .ts,.json --max-warnings 0",
"lint:fix": "npm run lint -- --fix",
"publish:schema": "./scripts/publishSchema.sh",
Expand Down
17 changes: 17 additions & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env sh

vc_path=vc-test-suite

echo "clean vc-test-suite"
rm -rf $vc_path
echo "clone vc-test-suite repo"
git clone --depth 1 https://github.com/w3c/vc-test-suite.git $vc_path
echo "copy configuration into $vc_path"
cp ./vc-test-suite-config.json $vc_path/config.json
cd $vc_path || exit 1
echo "Install dependencies"
npm i
echo "Install open-attestation-cli"
npm i @govtechsg/open-attestation-cli
npm run test -- --timeout 12000

6 changes: 6 additions & 0 deletions vc-test-suite-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"generator": "./node_modules/.bin/open-attestation wrap",
"presentationGenerator": "/bin/cat",
"generatorOptions": "--document-store 0xabcd --template-url https://some.org --dns-txt example.com --oav3 true --silent true",
"sectionsNotSupported": ["ldp", "jwt", "zkp"]
}

0 comments on commit f44c5bd

Please sign in to comment.