Repository navigation
Tests should work out-of-the-box - #226
pulkitsinghal wants to merge 3 commits into
Conversation
possible reason behind crash when testing: 1.5.0-rc.1 fails to load in PhantomJS 1.x + Karma environment angular/angular.js#13794 crash log: ``` PhantomJS 1.9.8 (Mac OS X 0.0.0) ERROR Error: [$injector:modulerr] Failed to instantiate module ng due to: TypeError: 'undefined' is not an object (evaluating 'Function.prototype.bind.apply') at ... at /Users/shahwarcoder/loopback-sdk-angular/test.e2e/given.js:19 ```
these are missing as aliases?
'updateOrCreate', 'removeById', 'destroyById',
```
LOG: 'methods', ['get', 'save', 'query', 'remove', 'delete', 'create', 'createMany', 'upsert', 'exists', 'findById', 'find', 'findOne', 'updateAll', 'deleteById', 'count', 'prototype$updateAttributes', 'bind', 'modelName']
✖ has all methods including aliases
✔ has `modelName` property
```
|
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
|
@pulkitsinghal please note that the pull-request points to the master branch of your fork |
|
@davidcheung - I've recorded a screencast, please refer to the two |
|
@pulkitsinghal thanks for replying so quickly, weird thing is out of the box the tests work for me, is your dependent node_moduels/loopback on version 2.29? it should be the dependent loopback that dictates what remoteMethod gets exposed from my understanding |
|
@davidcheung - no the loopback dependency version |
... testing frameworks can be kept static by default to avoid surprises but loopback itself is meant to be tested alongside the sdk
|
@davidcheung - ok much simpler now and works out of the box, please let me know if you're ready to accept and I recommend "squashing" this PR when merging |
|
@pulkitsinghal I am actually not able to reproduce Test failing out of the box on master other than the phantomjs which theres a pending PR #215, and I don't think locking down the dependencies is the optimal solution, if anything loopback-sdk-angular (in the case tests fails out of the box because dependencies updated) we should probably update our code. And ci is passing which I think the problem might be with the environment of you're setup |
|
|
Can one of the admins verify this patch? |
|
@pulkitsinghal thank you for your patience, my concern for Locking down the versions are we don't know what we're actually fixing, we're only putting a patch onto an issue without finding out the cause, and it would stop people from receiving fixes. For the missing or mismatching endpoints, the solution might be to bumped the depdency of
and as for phantomJS, yes this is definitely a problem, we are trying to address it in this PR I am not trying to say this is not my problem and call it a day, I dont want to close this PR until this is actually resolved, I'm just not convinced that locking down the version is the solution to this issue (and I dont even know how to reproduce the issue yet)
|
|
@pulkitsinghal Hello, long time no talk. ;) We definitely should get tests to work out of box and locking down all the deps OOB isn't a valid solution.
Anyways, @davidcheung has some homework this sprint/next sprint to look into some of the CI issues around this repository. Thanks for your patience. @davidcheung Please confirm how this project is cloned as part of the HW2 assignment for this repo. I agree with @pulkitsinghal that it should be as simple as |
|
@davidcheung - gotcha |
👍 ✖️ 💯
I would add the necessary |
|
@pulkitsinghal i believe the only problem with |
|
I believe the only issue that was causing the repo to fail out of the box was phantomjs, which is now solved, closing issue now, please reopen if you see fit @pulkitsinghal |
Cloning and running tests doesn't "just work":
angular/angular.js#13794
So I've updated the code to get to a point where anyone new coming in isn't solving pre-existing problems. This doesn't mean I've fixed anything, I've only leveled the playing field. You still need to look at one of the problems more closely and when the regression occurred.