-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Browser support with level.js #20
Conversation
Ah, sorry about that "mend" - can I fix that or is it too late?? |
Not sure how to test testling without pestering you with commit notifications... so I'm closing until I'm done :) |
BUT, I'm a little confused about this testing business...... When you said browserling you just meant ci.testling.com, right? Testling will hopefully run the existing mocha tests okay, though I'm not sure why it's not displaying results yet. I based the package.json changes off of https://github.com/substack/mocha-testling-ci-example As to your point 1) about having browser tests that run locally. Max's level.js does this quite nicely but I don't see how to do this with your mocha tests at all :/ Any pointers? And is that all that you wanted doing? Cheers! |
Yep, right. I meant testling. To run them locally, you can try running testling directly: https://github.com/substack/testling Let's pull @substack in, maybe he can help :). |
Running testling locally has been a really fruitful suggestion - I didn't realise it was an option when last commented! I've had to add level-js support to level-test and make a minor modification to level-js, hopefully both will get pulled upstream soon. 43 / 76 tests are passing locally. 31 of the failures are due to timeout errors, and look like:
...from navigator_spec.js and abstract_join_algorithm.js I think the real culprits are the use of .join and .nav, but I haven't taken a peak inside yet. The other two failing tests are to do with the level-js .del not working :/ Anyway, I SWEAR TO GOD that's it for this week's attempt ;) |
Shit. That join thing is bad, I'd like to help you sorting it out. I'm giving you committer action in the LevelUp fashion. As I get some time I'll add the appropriate contribute file. I think one problem is in the QueryOptimizer: I am leveraging LevelDOWN's approximateSize, while it cannot be possible in the browser (https://github.com/mcollina/node-levelgraph/blob/master/lib/queryplanner.js#L19-L26). However, you can fake it very nicely by looking at the amount of variables in the query. Could you please add in the README the instructions for running the testling tests and making the browserify build? (This browserify thing is getting bigger and bigger, I'm sorry about that). |
If you push this in a separate branch anche make another pull-request, I can code there too! |
So making approximateSize return 0 really was too good to be true! Ah well. I wonder if faking it is something that can and ought to live within level.js Thank you for the repo access :) I'll be sure to practice with git some more and rebase all these commits before doing a new branch PR. Have a good weekend! |
Could you please make a new Pull-Request from this repo's 'browser' branch to this repo? There, summarize what you have done and what it is missing. |
Just a couple of questions first:
|
For the time being, just use your versions. However this is not going to get merged in until they accept yours pull-requests. A |
However, this is not needed: refset/level.js@6e1d9b1. As I said, you can totally get around without it: put that call behind an if. |
Closing this in favor of #23. |
Initial PR to address #10