Skip to content

Commit

Permalink
use testament
Browse files Browse the repository at this point in the history
  • Loading branch information
mishankov committed Jan 13, 2024
1 parent dcd9643 commit fb01c9a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Test
run: nimble -d:ssl test
run: nimble unittests
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ htmldocs/

*.exe
nim.cfg

testresults/
testresults.html
1 change: 0 additions & 1 deletion tests/config.nims

This file was deleted.

1 change: 1 addition & 0 deletions tests/unit/config.nims
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
switch("path", "$projectDir/../../src")
1 change: 1 addition & 0 deletions tests/test_yahttp.nim → tests/unit/test_yahttp.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import tables

include yahttp


test "Generate correct basic auth header":
check ("test login", "test_pass").basicAuthHeader() == "Basic dGVzdCBsb2dpbjp0ZXN0X3Bhc3M="

Expand Down
5 changes: 4 additions & 1 deletion yahttp.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ task pretty, "Pretty":
exec "nimpretty src/yahttp.nim"

task examples, "Run examples":
exec "nim c --run examples/examples.nim "
exec "nim c --run examples/examples.nim"

task unittests, "Run unit tests":
exec "testament pattern \"tests/unit/*.nim\""

0 comments on commit fb01c9a

Please sign in to comment.