-
Notifications
You must be signed in to change notification settings - Fork 50
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
Running the tests in the browser #26
Conversation
Let's finish this up today after ArcticJS talks :) |
}).end(file.value, cb) | ||
}, () => { | ||
// FIXME debuging possible idb-blob-store bug | ||
setTimeout(done, 1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line was added for testing purposes.
It seems that the end
event on the returned write streams is emitted before it actually finishes, making the testes fail, since the db isn't consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still required with local-storage-blob-store
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, just removed the setTimeout
c6dbe96
to
bbb1e3c
Compare
repo.datastore.createReadStream(buf) | ||
.pipe(bl((err, data) => { | ||
expect(err).to.not.exist | ||
const eq = fs.readFileSync(process.cwd() + '/tests/test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.data').equals(data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you brfs
this file so that the test also works in the browser?
9149447
to
cbc223d
Compare
singleRun: true, | ||
|
||
// List plugins explicitly, since autoloading karma-webpack | ||
// won't work here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why? this should work if they are listed in package.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first time using karma, just removed that :)
I can try running it later. please let me know if you made progress so I don't do things twice |
@xicombd, can you check @dignifiedquire comments and adjust to those? |
Cleared all my confusions and running well on my machine, just left some notes about things that could be improved |
Yes, on it right now. @dignifiedquire: everything is working now, the problems I was having were apparently related to |
🎉🎉🎉🎉 Thank you for finishing this @xicombd :) |
Running the tests in the browser
Hey!
I'm trying to get the repo running on a browser, but I'm having some trouble doing it, so a review would be appreciated :)
I started by specifying two different entry points on
package.json
, one for now which usesfs-blob-store
as before and one for the browser which usesidb-blob-store
.I've also started setting up karma for running the tests, however they're currently very slow and inconsistent, having different results on different runs, but I haven't really understood why.
Please let me know if you find anything