mirror of
https://github.com/logos-storage/nim-serde.git
synced 2026-01-07 16:13:06 +00:00
fix: make tests work with nimble lock file
Signed-off-by: Mark Spanbroek <mark@spanbroek.net>
This commit is contained in:
parent
2ac098bfd4
commit
92f3616c6b
@ -11,8 +11,4 @@ requires "chronicles >= 0.10.3"
|
|||||||
requires "questionable >= 0.10.13 & < 0.11.0"
|
requires "questionable >= 0.10.13 & < 0.11.0"
|
||||||
requires "stint"
|
requires "stint"
|
||||||
requires "stew"
|
requires "stew"
|
||||||
|
requires "asynctest >= 0.5.1 & < 0.6.0"
|
||||||
task test, "Run the test suite":
|
|
||||||
exec "nimble install -d -y"
|
|
||||||
withDir "tests":
|
|
||||||
exec "nimble test"
|
|
||||||
|
|||||||
@ -322,7 +322,7 @@ proc fromJson*(T: typedesc[StUint or StInt], json: string): ?!T =
|
|||||||
T.fromJson(newJString(json))
|
T.fromJson(newJString(json))
|
||||||
|
|
||||||
proc fromJson*[T: ref object or object](_: type ?T, json: string): ?!Option[T] =
|
proc fromJson*[T: ref object or object](_: type ?T, json: string): ?!Option[T] =
|
||||||
when T is (StUInt or StInt):
|
when T is (StUint or StInt):
|
||||||
let jsn = newJString(json)
|
let jsn = newJString(json)
|
||||||
else:
|
else:
|
||||||
let jsn = ?JsonNode.parse(json) # full qualification required in-module only
|
let jsn = ?JsonNode.parse(json) # full qualification required in-module only
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
version = "0.1.0"
|
|
||||||
author = "nim serde authors"
|
|
||||||
description = "tests for nim serde library"
|
|
||||||
license = "MIT"
|
|
||||||
|
|
||||||
requires "asynctest >= 0.5.1 & < 0.6.0"
|
|
||||||
requires "questionable >= 0.10.13 & < 0.11.0"
|
|
||||||
|
|
||||||
task test, "Run the test suite":
|
|
||||||
exec "nimble install -d -y"
|
|
||||||
exec "nim c -r test"
|
|
||||||
Loading…
x
Reference in New Issue
Block a user