Comments (4)
Hi @Leonardo-Rocha, the scope of this particular project is purely around the superoak()
utility to make it easier to integration test Oak applications, so this isn’t something I plan to implement here.
I appreciate that testing Deno applications as a whole isn’t very mature atm with no existing testing library currently listed in the third party modules, and this is a pain point I’ve felt, hence why I created these very minimal test utils.
Looking at the Deno core repo it looks like there is no intention to include this kind of behaviour in Deno itself, so we may need a library to emerge eventually -denoland/deno#4092.
That link does suggest some libraries are already having some success using Mocha for testing, as this has a browser mode and thus is compatible with Deno. Maybe check that out?
I might see if can put something together later in a new repo - I’ll drop a note here and will probably convert these tests over as an example.
from superoak.
@Leonardo-Rocha I have written a small blog post which demonstrates how you can use Mocha (similar to jest) to test your Deno code - check it out here: https://dev.to/craigmorten/testing-your-deno-apps-with-mocha-4f35
from superoak.
@Leonardo-Rocha the best ideas always come from real problems people have - why I always welcome issues, comments, PRs etc!
Note: I gave the suggestions without realizing the complexity of it, after taking a look at Jest source code length I instantly regretted haha
I looked at it myself a week or so back while feeling ambitious and quickly changed my mind 😂
It shouldn't be too hard to write simple hooks, but I think the effort is better placed adding wrappers, ports or using directly testing frameworks that are known to work well, have a large community of support and provide all these features already!
from superoak.
Thanks a lot, Craig! I read your response and I was just to reading mocha docs right now! Later I'll follow your tutorial and jump straight into Mocha. Btw I'm happy to see that you could create some content based on my suggestions. I'll also recommend your tutorial for my fellow brazilian devs.
Note: I gave the suggestions without realizing the complexity of it, after taking a look at Jest source code length I instantly regretted haha
from superoak.
Related Issues (16)
- error: TS2345 [ERROR]: Argument of type 'Application<Record<string, any>>' is not assignable to parameter of type 'string | Application<Record<string, any>>'. HOT 4
- callback function parameters are displaced. HOT 2
- Need a FAQ section in README.md HOT 3
- ReferenceError: Access to "location", run again with --location <href> HOT 2
- Project does not compile with latest version of oak using Deno 1.3.0 HOT 7
- How to test cookie based sessions? HOT 3
- Tests hang when running with --unstable (Oak 7.3, SuperOak 4.2, Deno 1.9.2) HOT 13
- Document how to send request body, headers, etc HOT 1
- Testing error case fails HOT 5
- Example fails with "Re-exporting a type.." HOT 3
- Does not send correctly an application/x-www-form-urlencoded HOT 2
- Demo Code Throws Errors HOT 1
- I can`t install it HOT 4
- AssertionError: Test case is leaking async ops. HOT 5
- AssertionError: Test case is leaking async ops. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superoak.