-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Create test suite foundation #17
Conversation
#4 was closed because it includes a test_helper but doesn't include any actual test, I think this should include a meaningful test before of being merged 😊 |
@guilleiguaran I'm working on adding tests right now locally, wanted to get the setup code merged in first, since they are separate concerns |
If code is not being used there is no reason to merge so even that they are
separate concerns, test setup and tests should be in the same pr.
…On Sun, Dec 11, 2016 at 10:53 AM Jon Moss ***@***.***> wrote:
@guilleiguaran <https://github.com/guilleiguaran> I'm working on adding
tests right now locally, wanted to get the setup code merged in first,
since they are separate concerns
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#17 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAC66LloYZzBz0mUJJ8l_7i_fqCONCshks5rHBxvgaJpZM4LJ8_M>
.
|
Not sure what the strategy for testing this is going to be, but I made an app for manually testing the gem here: Happy to adapt this into the beginnings of a test suite if the using a small rails app as a fixture is a useful approach. |
I think it would be great to have testcases for webpacker, and I'm willing to help! Can you create an issue to describe your thoughts on testing webpacker? |
Just to share this snippet of ApplicationSystemTestCase I'm using. Assuming you have a frontpages controller, it works with current default pack for react/vue. I can't seem to compile angular.
Personally, I do not know the best testing strategy for now. |
@ytbryan Why not use client side testing tools (Jest, Enzyme), much faster to build and probably take some load off from Rails tests? |
yeah @gauravtiwari probably better to have a client-side testing approach for webpackers' app. I just copy and edit some of my testcases I found. Not aiming for best approach there. |
Oh sorry, forgive me :) I didn't mean that way. Great 👍 |
@gauravtiwari @ytbryan salute! Contributor to JSDOM and Rollup.js here. Working on Back to JS package testing. I used to use PhantomJS but truth be told 90% of it's features (and bloat) aren't needed (except for that aristocrat that actually NEEDS visual renders from tests). I have been duck taping some patterns I use with ES6 and Rollup.js with Buble transpiler. (need to update upstream repo but https://github.com/snuggs/buble-tape) I'm getting a tiny 5kb bundle that runs all my tests in browser (or not) and only dependencies needed are rollup, jsdom, and tap(e). for "unit" and "acceptance" tests of my DOM components. (hit me up to show you how). In no means is this a recommendation to bike shed. It's just a reminder that in this space you usually need 50%+ less than you think you need. But you don't know what you don't know. Jest i've dealt with it for months and feels much like protractor. I cannot express enough how the best thing for this project is to stay as lightweight and close to the HTML / DOM Living Standard specs maintained by the WHATWG. We also maintain the upstreaming of test cases to the web platform tests. These tests are what the browsers use to test their adhering to the WHATWG/DOM Living standard. Oftentimes patches to JSDOM get upstreamed into the web platform tests as you can see in my PR implementing the What this means in english is you always will use a tool that is the most up to date by the latest WHATWG/ECMAScript specs for the platform which is what you're testing anyways! All the tools mimic the DOM. I'd rather stick with the strategies of the people who implement the specs than a tool that recreates the wheel. Same holds true with every single front end framework out there. Our future selves will thank us. The DOM now follows WebIDL specs and as the ECMA/DOM specs matriculate we usually downstream to JSDOM or upstream to the Web platform tests. Just to give you a heads up because the front end is nowhere near the same as it was 2 years ago in regards to accessing the dom (in the proper way) via Rails applications. There is some overlap with concerns as this is focused on webpack. But testing frontend code in Rails itself leaved much to be desired in the past. Now we have an opportunity to change that. Will star this pull to get notifications. If there is anywhere I can help in regards to getting this testing going let me know where I can fit in. Peace and Hair Grease fam! 💪 |
@maclover7 Closing this one. We have test suite setup now #259 and #299 🎉 👍 |
No description provided.