Commit Graph

31 Commits

Author SHA1 Message Date
Nora 1975481cb0 chore: fix eslint violations
Fix comma-dangle violations
2019-11-15 21:03:12 -05:00
Miroslav Bajtoš 39771be12f
Add a test to verify PersistedModel updateAll
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-10-07 10:49:57 +02:00
Miroslav Bajtoš 0097580537
Update eslint & config to latest
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-10-03 10:54:13 +02:00
Maxim Sharai 2aff46a79a
Add tests to verify Model.exists() is working 2019-08-23 10:16:02 +02:00
Agnes Lin 59f70ab3ce chore: update copyrights years 2019-05-07 13:34:15 -04:00
Jannis Ötjengerdes 4108db8945
fix: return null when findById/findOne returns 404
Co-authored-by: Maxim Sharai <maxim.sharai@tispr.com>
Co-authored-by: Jannis Ötjengerdes <joetjengerdes@rightmart.de>
2019-01-21 16:32:41 +01:00
virkt25 1a7b1be96d style: fix linting
- update eslint and eslint config
- fix linting
2018-08-24 09:14:41 -04:00
Miroslav Bajtoš 60c081f893
chore: update copyright notice years 2018-01-16 15:55:09 +01:00
maxim.sharai af125c50cc
Fix duplicate definition of a remote model type
Before this commit, when a remote model had relations, the model was
registered an additional time per each relation. As a result,
the following warnings were printed to the console

   Warning: overriding remoting type $MODEL_NAME

This commit fixes registration of models with strong-remoting to avoid
those warnings.
2018-01-16 15:15:45 +01:00
Dimitris a3d110b78c
Preserve related models from "include" filter
Before this change, when making a remote call with "include" filter
(for example `findById(11, {include:['children']})`), the related
models were removed from the result.

This commit fixes the implementation to correctly preserve related
models and also to cast them to correct model instances.
2017-12-12 09:39:37 +01:00
Miroslav Bajtoš 55cb88f727
Add eslint to npm test, fix linter issues 2017-12-11 14:51:48 +01:00
Miroslav Bajtoš d6a5c768fd
Refactor tests to use local per-app model registry
Refactor tests to stop sharing global models between different test
suites and use local per-app model registry instead.

Also clean up all test code to use `const` and `let` instead of `var`.
2017-12-11 14:45:43 +01:00
Kenny Sabir 816e989b4e
Add support for configuring remoting options
Allow remote-connector users to provide "options" property in the
datasource configuration, this "options" object is then passed down to
RemoteObjects and allows e.g. configuration of pass-through
authorization, where the remoting connector passes the access token
used to make the incoming request down to the backend service invoked.
2017-12-05 14:22:10 +01:00
Miroslav Bajtoš 1168bb6080 Add "options" arg to stubbed models in tests 2016-12-22 10:56:11 +01:00
Miroslav Bajtoš e047c56e41 Update to juggler@3 and remoting@3 2016-09-01 12:58:16 +02:00
Miroslav Bajtoš e19cddd343 test: fix deprecation warnings 2016-09-01 10:47:13 +02:00
Miroslav Bajtoš fbc013dab7 test: use strict, handle errors 2016-09-01 10:47:13 +02:00
Simon Ho c6d36f30a7 Do not use native promises in tests
- Refactor some tests to use bluebird for promise impl
- Fix based on comments at https://github.com/strongloop/loopback-connector-remote/pull/44/files#r61875179
- Add tests to integration dir (organized/named by feature)
2016-05-19 18:04:23 -07:00
Ryan Graham 17e60c9351
update copyright notices and license 2016-05-06 12:02:21 -07:00
Heath Morrison a4e825191f Added promise support 2016-04-25 01:07:15 +03:00
Miroslav Bajtoš 3c42c0a6af test: listen on ephemeral ports 2016-02-05 13:29:43 +01:00
Geoffroy ba1703fbea Clean up tests 2016-01-07 20:08:05 -08:00
Geoffroy 580ea297ba Removed unused describe definition 2016-01-07 00:46:07 -06:00
Geoffroy ad3749b3d8 Removed unused file 2016-01-07 00:34:22 -06:00
Geoffroy e8b7762227 Removed unused dependencies 2016-01-07 00:33:38 -06:00
Richard Pringle dbe06078fb Add test for custom http.path configuration. 2015-12-03 12:56:00 -05:00
Miroslav Bajtoš 9d862437da test: load the correct Remote instance
Fix unit-tests to always reference the remote connector via
require('..') instead of depending on the remote connector
bundled in loopback, which is quite often an older version.
2015-11-25 08:46:40 +01:00
Ryan Graham 56e6236fa3 test: specify 127.0.0.1 for test server
Without this the client may attempt to connect to 'localhost' which may
resolve to the IPv6 equivalent of '0.0.0.0', which is '::', which is
only useful listening on and not so useful for connecting too.
2015-07-20 18:58:21 -07:00
Simon Ho 2b3f5171fe Create proxy methods for aliases 2015-03-28 11:39:49 -07:00
Krishna Raman 2df5b726b1 Fix formatting 2014-09-25 14:20:26 -07:00
Krishna Raman 724fd7d99c Move remote connector from loopback 2014-09-25 14:20:22 -07:00