-
Notifications
You must be signed in to change notification settings - Fork 14
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
Ember 2.15 and ember-codemod based on #176 RFC #80
Conversation
@toranb I removed it from the commit but wanted your input/thoughts on wrapping Unit testing results in quite a bit of overhead wrapping every push in a |
Ran https://github.com/ember-cli/ember-modules-codemod to codemod based on this RFC. |
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.
Wow @snewcomer this was a huge effort on your part! Great work my friend! Regarding the addition of ember run - I prefer to avoid any change to how we schedule the work and from what I see you were able to leave that as-is
@snewcomer (reading your comments above again) - was your comment about ember.run related to this method in the store? scheduleUpdate(type) {
var recompute = this.get("recompute");
recompute.addObject(type);
run.scheduleOnce('actions', this, 'updateFilters');
} To reduce the overhead I did write a qunit helper that would wrap unit tests with an ember.run (to make it less verbose for the test author). Is that not working/ and or useful for this issue? |
@toranb ah I totally forgot about that. Thanks for the help! |
@toranb ah so we probably want to include it in |
test-support/helpers/qunit.js
Outdated
let test = function(...args) { | ||
|
||
function wrapper(assert) { | ||
let env = assert.test.testEnvironment; |
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.
@toranb this was needed for cases where we assign this.store
in the test env.
- "4" | ||
|
||
sudo: false | ||
dist: trusty | ||
|
||
addons: | ||
firefox: "51.0" | ||
chrome: stable |
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.
just went with the ember-cli recommendations.
- EMBER_TRY_SCENARIO=ember-release | ||
- EMBER_TRY_SCENARIO=ember-beta | ||
- EMBER_TRY_SCENARIO=ember-canary |
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.
added a few test scenarios here.
Tested this fork with our app and all is good. |
b528868
to
9d3177d
Compare
@snewcomer refresh my memory here with test support - what will the import look like for this now that we are exporting it from simple store (assuming we merge it as-is) ? |
@toranb so it will just be merged with the consuming apps test directory. So import { test } from 'my-app/tests/helpers/qunit' |
@snewcomer the only concerns I have are that name (qunit -directly exported from test-support). I'm afraid that naming could be 2 generic and in turn stomp over another at some point (if not already) for users with a good deal of addons/ and test helpers. That fair or no? Regarding the cleanup method - I'm unclear on how arguments is correctly scoped after you flip'd that to an arrow function. In the original implementation we have a function that wraps the inner run and it's the arguments of that parent func we wanted (using the |
@snewcomer also w/ the size of this PR would it be possible to pop off that test-support specifically and land that in a day or so? I'd love to pull this in / version it and release it to ensure everything is g2g for all users ;) at which point we can then do a tiny PR for test support let me know if you are cool w/ this boss note: I'm also trying to confirm ember-cli v2.4.3 users (who might also be stuck on node 4) have no issue taking this new import syntax. In the ember-redux addon we did a full feature bump for this because we decided to explicitly drop node 4/5 support (not sure that is required here - just curious if we will have trouble). You mind spinning up a *new ember-cli v2.4.3 app (with node 4LTS) and taking simple store (fork) for a test drive to confirm it's cool ? |
@toranb yeah I agree with you. I think I got carried away w/ this PR. Dropped.
|
@snewcomer thanks for the quick adjustment here! I took ember-cli v2.4.3 for a spin myself using this new release v5.7.0 and it's all good from what I can see toranb/ember-pure-components-example@bf45773 Thanks again Scott !! Really appreciate you helping keep this addon up to date! |
@toranb Lmk what you think about wrapping
scheduleUpdate
in arun
. I think Ember test errors when doingstore.push
are telling us to make it runloop aware b/c it potentially might be a good idea. Be great to hear your thoughts.- [x] movetest/helpers/qunit
totest-support/helpers/qunit
- NEXT PR- [x] remove jquery if possible