Skip to content
This repository has been archived by the owner on Jun 15, 2020. It is now read-only.

Commit

Permalink
Create a Bash script for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fungiboletus committed Nov 6, 2013
1 parent ce27ffc commit 7246f21
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ results

npm-debug.log
node_modules
tests/*.json
tests/*.d.ts
23 changes: 23 additions & 0 deletions runTests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

set -e # abort on the first error


for f in tests/*.proto
do
fileName=${f%.*}

# Convert the prototype file
./node_modules/protobufjs/bin/proto2js $f > $fileName.json

# Start the program (it should work)
node command.js -f $fileName.json > $fileName.d.ts

# Run the TypeScript compiler and let see if it's ok
tsc -out /dev/null $fileName.d.ts

# Run more tests in JavaScript
done


echo OK
6 changes: 0 additions & 6 deletions tests/generateJson.sh

This file was deleted.

0 comments on commit 7246f21

Please sign in to comment.