-
Notifications
You must be signed in to change notification settings - Fork 77
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
Tests #211
Comments
Sounds great! 🎉 |
I've tried to make some first test like this var tape = require('tape')
var bankai = require('..')
var fs = require('fs')
var path = require('path')
tape('should render example', function (t) {
t.plan(1)
var assets = bankai(path.resolve(__dirname, '../example.js'))
var ws = fs.createWriteStream('bundle.js')
var jsStream = assets.js()
jsStream.on('end', function () {
t.equal(document.querySelector('h1').textContent, 'hello planet')
})
jsStream.pipe(ws)
}) I though that would be easy to run with tape-run, but it isn't :(
Do you have any idea why is this happening? Should I open an issue in tape-run repo or try some different approach on tests? |
Why are you using tape-run? That's meant for browser testing, but it looks like what you're testing could be done in pure node, no? |
Oh yeah, what tim said. I believe fsevents is a C++ module which is the
origin of that error (e.g. browserify won't have a good time bundling that
haha)
…On Thu, Jul 6, 2017 at 5:33 PM Tim Wisniewski ***@***.***> wrote:
Why are you using tape-run? That's meant for browser testing, but it looks
like what you're testing could be done in pure node, no?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#211 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACWleptATL8nO_EViozRDEWrQ27hvSfBks5sLP5dgaJpZM4OMRi6>
.
|
@timwis just because bankai creates code meant to run in the browser. I could directly check the content of each stream but that's browserify generated code so I though it could be easy with tape-run haha if you have a better idea I would love to hear it :) @yoshuawuyts more than that, I think the fsevents is an OSX exclusive library, that's why it's usually an OptionalDependency, and I'm working on a linux machine... |
Someone should rewrite watchify using
https://github.com/mafintosh/recursive-watch haha; think it'd be way better
/ way faster to install too (:
…On Thu, Jul 6, 2017 at 6:16 PM Yerko Palma ***@***.***> wrote:
@timwis <https://github.com/timwis> just because bankai creates code
meant to run in the browser. I could directly check the content of each
stream but that's browserify generated code so I though it could be easy
with tape-run haha if you have a better idea I would love to hear it :)
@yoshuawuyts <https://github.com/yoshuawuyts> more than that, I think the
fsevents is an OSX exclusive library, that's why it's usually an
OptionalDependency, and I'm working on a linux machine...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#211 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACWlekfbUQFALDab0WDiesb5oXizwijcks5sLQhSgaJpZM4OMRi6>
.
|
This issue is supposed to be a tracker for tests. I think that tests deserve their own folder instead of a single file. Also, I would like to know which issues might be related/resolved with tests, IMO these are:
Anyway, if it's fine to use a tests folder, I could start a test branch :) The issue list is just to check. ✌️
The text was updated successfully, but these errors were encountered: