mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-25 08:43:58 +00:00
unittest: use defines instead of env vars (#16165)
* unittest: use defines instead of env vars * use defines in testament * fixup Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
@@ -7,12 +7,6 @@ import times, strutils, unittest
|
||||
when not defined(js):
|
||||
import os
|
||||
|
||||
# Normally testament configures unittest with environment variables,
|
||||
# but that doesn't work for the JS target. So instead we must set the correct
|
||||
# settings here.
|
||||
addOutputFormatter(
|
||||
newConsoleOutputFormatter(PRINT_FAILURES, colorOutput = false))
|
||||
|
||||
proc staticTz(hours, minutes, seconds: int = 0): Timezone {.noSideEffect.} =
|
||||
let offset = hours * 3600 + minutes * 60 + seconds
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ discard """
|
||||
|
||||
[Suite] test name filtering
|
||||
'''
|
||||
targets: "c js"
|
||||
"""
|
||||
|
||||
import unittest, sequtils
|
||||
|
||||
Reference in New Issue
Block a user