D
Deno
How to abstract tests to allow running different functions against the same test suite? - Deno
B
Deno
β’
2y ago
β’
4 replies
bebraw
How to abstract tests to allow running different functions against the same test suite?
I
've set up two suites of tests like this
:
https://github.com/gustwindjs/gustwind/tree/develop/htmlisp/html-tests
,
https://github.com/gustwindjs/gustwind/tree/develop/htmlisp/html-tests-sync
. They are effectively the same but one is for async code and one for sync
. Due to how the language works
, technically it should be possible to use the async test suite for testing the sync code since
await
await
just wraps sync result within a
Promise
Promise
. The question is
, what would be a sane way to extract the shared tests and then inject the functions so I could end up with a single test suite against both async and sync functions
?
Deno
Join
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Running test
J
Jolo / help
2y ago
Running multiple Deno versions at the same time
L
Leokuma / help
2y ago