README: Add "Testing" section

This commit is contained in:
Tomasz Rybarczyk 2018-10-21 03:32:06 +02:00
parent 751ced6d76
commit e21bd27173
4 changed files with 20 additions and 4 deletions

View File

@ -75,6 +75,17 @@ run = do
``` ```
## Testing
Currently tests are prepared to work with default and local setup for postgresql (ident authentication, standart port etc.).
If you think that we should add configuration layer for our test runner please open an issue.
To run suite:
* prepare empty "purspg" database
* `$ nmp install literate-purescript`
* `$ ./bin/test.sh`
## Generating SQL Queries ## Generating SQL Queries
@ -85,6 +96,3 @@ generator instead of a preprocessor, and easier to use.
[sqltopurs]: https://github.com/rightfold/sqltopurs [sqltopurs]: https://github.com/rightfold/sqltopurs
## Testing
To run tests you have to prepare "purspg" database and use standard command: `pulp test`.

4
bin/test.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
litps compile --file README.md; mv README.purs test/Guide.purs; pulp test --main Test.Main

View File

@ -20,7 +20,8 @@
"purescript-decimals": "^4.0.0", "purescript-decimals": "^4.0.0",
"purescript-js-date": "^6.0.0", "purescript-js-date": "^6.0.0",
"purescript-foreign-object": "^1.0.0", "purescript-foreign-object": "^1.0.0",
"purescript-foreign-generic": "^7.0.0" "purescript-foreign-generic": "^7.0.0",
"purescript-tuples": "^5.0.0"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -7,5 +7,8 @@
"global": "^4.3.2", "global": "^4.3.2",
"pg": "^6.1.2", "pg": "^6.1.2",
"pulp": "^12.3.0" "pulp": "^12.3.0"
},
"devDependencies": {
"literate-purescript": "^0.1.2"
} }
} }