fix: make tests work with nimble lock file

Signed-off-by: Mark Spanbroek <mark@spanbroek.net>
This commit is contained in:
Mark Spanbroek 2025-09-24 09:39:32 +02:00
parent 2ac098bfd4
commit 92f3616c6b
No known key found for this signature in database
GPG Key ID: FBE3E9548D427C00
3 changed files with 2 additions and 17 deletions

View File

@ -11,8 +11,4 @@ requires "chronicles >= 0.10.3"
requires "questionable >= 0.10.13 & < 0.11.0"
requires "stint"
requires "stew"
task test, "Run the test suite":
exec "nimble install -d -y"
withDir "tests":
exec "nimble test"
requires "asynctest >= 0.5.1 & < 0.6.0"

View File

@ -322,7 +322,7 @@ proc fromJson*(T: typedesc[StUint or StInt], json: string): ?!T =
T.fromJson(newJString(json))
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)
else:
let jsn = ?JsonNode.parse(json) # full qualification required in-module only

View File

@ -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"