Miroslav Bajtoš
1b7858a857
chore: update eslint to 6.x
...
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-12-03 10:09:16 +01:00
Agnes Lin
de4718d5b8
chore: update copyrights years ( #1737 )
2019-05-08 11:45:37 -04:00
Miroslav Bajtoš
9e0f624ad5
manually fix remaining problems
2018-12-07 16:46:15 +01:00
Miroslav Bajtoš
422ec9ad4f
autofix eslint errors
2018-12-07 16:46:15 +01:00
Miroslav Bajtoš
7d50f6130b
Upgrade eslint-config-loopback + fix formatting
...
The new version of our config enabled function-paren-newline rule,
this commit fixes the codebase to use more consistent handling
of newlines when calling functions.
2018-07-16 08:46:25 +02:00
Siddhi Pai
3baa61590e
Fix block padding
...
* Remove test/.eslintrc
* run eslint . --fix
2016-12-13 16:05:50 -08:00
Miroslav Bajtoš
0f7a567f18
Upgrade eslint & config to latest
...
- eslint ^3.11.1
- eslint-config-loopback: ^6.0.0
- fix linter errors (mostly no-undef)
2016-12-05 15:14:09 +01:00
Amir Jafarian
aec678d252
Fix manually
2016-08-22 19:20:12 -04:00
Amir Jafarian
aa6d28268b
Auto-update by eslint --fix
2016-08-22 15:12:25 -04:00
Miroslav Bajtoš
c7f34c3452
eslint config 2.0 + remove extra empty lines
...
Upgrade eslint-config-loopback to ^2.0.0.
Remove extra empty lines to make `npm run lint` pass again.
2016-04-19 16:11:43 +02:00
Miroslav Bajtoš
39e04a1756
eslint --fix
2016-04-05 15:25:34 +02:00
Ryan Graham
c467b43c38
Insert copyright headers
2016-04-04 18:14:03 -07:00
Raymond Feng
682f6340d3
Optimze automigrate() to cut the test time signicantly
2015-08-27 15:59:58 -07:00
Miroslav Bajtoš
1fd6eff10f
Intent-based hooks for persistence
...
This patch introduces a new API for "intent-based" hooks. These hooks
are not tied to a particular method (e.g. "find" or "update"). Instead,
they are triggered from all methods that execute a particular "intent".
The consumer API is very simple, there is a new method
Model.observe(name, observer), where the observer is function
observer(context, callback).
Observers are inherited by child models and it is possible to register
multiple observers for the same hook.
List of hooks:
- query
- before save
- after save
- after delete
2015-01-29 08:43:52 +01:00
Raymond Feng
9325ce316b
Allow before hooks to pass arguments to next()
2014-07-15 12:51:33 -07:00
Ritchie Martori
e909749455
Add tests for change / delete events
2014-01-29 11:03:04 -08:00
Raymond Feng
2b8c1ebaee
Reformat the code
2014-01-24 09:09:53 -08:00
Raymond Feng
6af4b1ba2f
More renames: schema -> dataSource, adapter -> connector
2013-07-23 11:16:43 -07:00
Anatoliy Chakkaev
83027f9ead
Accept related objects when creating instance #247
2013-05-13 22:04:28 -07:00
Anatoliy Chakkaev
c4d4b68413
Datatypes casting
2013-05-13 22:04:28 -07:00
Anatoliy Chakkaev
43f395d653
Manually require init
2013-04-06 14:57:12 +04:00
Anatoliy Chakkaev
f36372ba80
Add more love to tests, pr #249
2013-03-31 14:17:25 +04:00
Scott Nonnenberg
5655e8f4d2
tests only: no afterCreate/afterUpdate on errors
...
Added tests to ensure that the afterCreate/afterUpdate handlers are not run if the adapter returns an error.
2013-03-30 17:20:32 -07:00
Scott Nonnenberg
2ba862f5af
afterDestroy not called on adapter error
...
Similar to afterCreate and afterUpdate, we don't want to run the afterXXXX handlers if the delete failed according to the adapter.
2013-03-30 17:18:47 -07:00
Anatoliy Chakkaev
839791de2f
Upd tests
...
- skipping
- hook up redis-hq
- some stuff should be moved to advanced-querying tests
2013-03-29 11:43:04 +04:00
Anatoliy Chakkaev
7707b236ff
Test hooks and object lifecycle as per #242
2013-03-28 15:27:50 +04:00
Anatoliy Chakkaev
2d6cc9aaee
Mongodb tolerance
2013-03-27 21:53:07 +04:00
Anatoliy Chakkaev
b04a250b63
Update attribute additional test
2013-03-27 18:53:46 +04:00
Anatoliy Chakkaev
ffdfac30e1
Migration-friendly tests
2013-03-27 04:50:34 +04:00
Anatoliy Chakkaev
0d5f4a9aad
Added test case for #238 : password hashing before save
2013-03-27 00:49:02 +04:00
Anatoliy Chakkaev
d5d07d8806
Make tests importable
2013-03-26 04:41:00 +04:00
Anatoliy Chakkaev
5ea5da0153
Rewrite hooks API
...
This commit breaks compatibility, but adds consistent API and allow modify data of update
2013-03-25 01:25:10 +04:00