mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 23:16:03 +00:00
fix collection doc and test
This commit is contained in:
@@ -233,7 +233,7 @@ class Collection {
|
||||
/**
|
||||
* Remove models or a model.
|
||||
*
|
||||
* @param {Model[]|Model} models Models ar a model.
|
||||
* @param {Model[]|Model|string} models Models, a model or a model ID.
|
||||
* @param {{
|
||||
* silent?: boolean,
|
||||
* }} [options] Options.
|
||||
|
||||
@@ -98,6 +98,11 @@ describe('collection', () => {
|
||||
|
||||
expect(collection.length).toBe(2);
|
||||
expect(collection.get('2')).toBeUndefined();
|
||||
|
||||
collection.remove('1');
|
||||
|
||||
expect(collection.length).toBe(1);
|
||||
expect(collection.get('1')).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should push', () => {
|
||||
|
||||
Reference in New Issue
Block a user