Hoping to record the first part tonight or tomorrow and the 2nd part right after Christmas (it seems like the beta is stable enough to migrate now). Soon
This is only true for package testing btw, for app testing, Iām not sure exactly how theyāre going to do it yet.
Dou you mean module unit testing? With 1.3 I hope I can unit-test using modules instead of packagesā¦
I mean that practicalmeteor:mocha is a package testing solution only (as things currently stand). It does not work for app-testing. The new changes from the MDG will replace Velocityās āmirrorsā with an app-testing mode.
Once this app testing mode is ready, it will allow for tools like the current mike:mocha or sanjo:jasmine to be ported over from Velocity. Iām not sure if the MDG will actually do something here or not, thatās not too clear to me yet.
As for unit testing, with 1.3 modules you no longer need to load the entire Meteor context. Thereās already an example to do that here:
So looking forward to this! I havenāt been doing any testing and need @SkinnyGeek1010 to whip me into shape.
Only the sanjo:jasmine client unit mode is using Karma. The client intergration mode of sanjo:jasmine and mike:mocha is using a hidden iframe that is injected into the app. In Ci mode it is using PhantomJS.
Hello, Are you still working on this.
Yep! I did a āfirst draftā of the part-1 Thursday but ran into issues using the plain webdriver syntax. Iām going to re-record it today using a set of helpers iāve made that really help out on the race conditions and āwhy isnāt this workingā moments.
For example, iāll use: fillInput('First Name', 'Adam')
instead of using 3 or 4 lines of webdriver code (using things like waitFor a selector).
I wanted to try and not use my opinionated helpers but the 15min video turned into an hour with a ton of work trying to edit out the bad parts. The lib will be uploaded here: https://github.com/AdamBrodzinski/capy-js
You should definitely have a look at the set of UI helpers I developed along with Gagarin, e.g.
The Gagarin UI helpers are very good. Iām torn between which would be the better pathā¦ extending them so they match the Nightwatch UI helpers; or figure out how to require and add the Nightwatch helpers into Gagarin.
I am currently in an porcess of refactoring different parts of Gagarin. I hope that after that it will be much easier to integrate with other testing libraries. In particular, you should be able to easily exchange & hook new helpers in both ways.
Just wanted to pop in and say I havenāt forgotten about this. I had a Node service start acting flakey and had to re-write it in my free time over the past couple weeks.
Being that 1.3 isnāt prod ready yet I wasnāt in too big of a hurry. Should be able to tackle this next week
I promise iām making these soon I think Meteor 1.3 has settled down for the most partā¦ mainly now there are not globals. I also have to catch up on the changes so farā¦ I think there are no longer globals? so migrating might be more of a pain that originally planned
These wonāt happen until the first week of Feb at the earliestā¦ have to leave on a business trip and wonāt be back until then. I donāt see 1.3 coming out before then so we should be ok
Keep on rolling!
Do they have an ETA on 1.3 or youāre just guessing from the current beta?
just guessing based on the beta github issues and no release candidate yet.
Iām very keen to see what you come up with here @SkinnyGeek1010.
Iāve been working on an app in 1.2 with react and am a little concerned that I didnāt start with the 1.3 betaā¦ not sure what will break when I update to 1.3. not sure how much I will need to change or what will be impacted by the upgrade.
Sashko said in the latest weekly podcast that Meteor 1.3 will be backwards compatible with Meteor 1.2. So you can upgrade without making any changes to your app code. After that you can migrate to ES2015 modules if you want. This is also something you can do piece by piece. So no worries.
@cstrat I recently upgraded from 1.1 to 1.3 beta4 and it was very painless. You donāt have to import any Meteor modules and all of your code should load up as is. You can leave globals as is and can migrate them as you have time.
I was able to convert the browserify.js
file that exposed globals to the 1.3 NPM imports and then for the most part everything stays the same. I had to remove the react package and import react from NPM, and exposed that globally as well. (as well as add the meteor data package back in)
In the future (in my app) iāll work on converting a file from global to imports as I work on it (and also can test it easier). Thereās no real reason to stop everything and import one file at a time.
For the tutorial app it should be a 3 min fix to switch browserify to npm imports and a working app. The rest would be just making it as good as possible (imports, etcā¦).
At any rate very little will need to be changed. Itās more less a little re-wiring to migrate browserify.
Thatās interesting.
Weāve tried today to upgrade our app to 1.3-modules-beta.5 and when trying to run meteor we keep getting errors like:
ReferenceError: later is not defined
related to code that declares some global variables like:
later = function() { }
Any ideas whether this will eventually be backward compatible as well? We know this is not a good style but we have quite a bit of legacy code, and packages, that do declare variables like thisā¦
Or should we prepare for a big rewrite to get rid of all globals?
Edited:
Ok, I played around with this a bit more and looks like there are more problems (I needed to install packages like jquery or moment through npm, third part libraries that we have in our client/thirdparty folder have problems like:
āCannot set property āChosenā of undefinedā on a line that looks like:
" this.Chosen = (function(_super) {"
And I suspect there will be many more fixes to do. This is a huge production app (thousands of users at a time) that weāve started in late 2012 learning on the way, switching from spark to blaze, etc. there is obviously quite a bit of code that could use some refactoring, but it works
So, Iām guessing, ābackward compabilitiyā in this case means, ābackward compatible as long as you have a proper es2015 compatible codeā?