ts-patch-mongoose 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-patch-mongoose",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Patch history & events for mongoose models",
|
|
5
5
|
"author": "Alex Eagle",
|
|
6
6
|
"license": "MIT",
|
|
@@ -105,6 +105,7 @@
|
|
|
105
105
|
"merge": "2.1.1",
|
|
106
106
|
"mongoose": "6.10.5",
|
|
107
107
|
"open-cli": "7.2.0",
|
|
108
|
+
"ts-node": "10.9.1",
|
|
108
109
|
"typescript": "5.0.4"
|
|
109
110
|
},
|
|
110
111
|
"peerDependencies": {
|
|
@@ -98,7 +98,7 @@ describe('plugin - event updated & patch history disabled', () => {
|
|
|
98
98
|
expect(em.emit).toHaveBeenCalledTimes(3)
|
|
99
99
|
|
|
100
100
|
// Confirm that the document is updated
|
|
101
|
-
const updated = await User.find({})
|
|
101
|
+
const updated = await User.find({}).sort({ name: 1 })
|
|
102
102
|
expect(updated).toHaveLength(3)
|
|
103
103
|
const [alice, bob, john] = updated
|
|
104
104
|
expect(alice.role).toBe('manager')
|
|
@@ -123,7 +123,7 @@ describe('plugin - event updated & patch history disabled', () => {
|
|
|
123
123
|
expect(em.emit).toHaveBeenCalledTimes(1)
|
|
124
124
|
|
|
125
125
|
// Confirm that the document is updated
|
|
126
|
-
const updated = await User.find({})
|
|
126
|
+
const updated = await User.find({}).sort({ name: 1 })
|
|
127
127
|
expect(updated).toHaveLength(3)
|
|
128
128
|
const [alice, bob, john] = updated
|
|
129
129
|
expect(alice.role).toBe('user')
|
|
@@ -172,7 +172,7 @@ describe('plugin - event updated & patch history disabled', () => {
|
|
|
172
172
|
})
|
|
173
173
|
|
|
174
174
|
// Confirm that the document is updated
|
|
175
|
-
const updated = await User.find({})
|
|
175
|
+
const updated = await User.find({}).sort({ name: 1 })
|
|
176
176
|
expect(updated).toHaveLength(3)
|
|
177
177
|
const [alice, bob, john] = updated
|
|
178
178
|
expect(alice.role).toBe('user')
|
|
@@ -197,7 +197,7 @@ describe('plugin - event updated & patch history disabled', () => {
|
|
|
197
197
|
expect(em.emit).toHaveBeenCalledTimes(3)
|
|
198
198
|
|
|
199
199
|
// Confirm that the document is updated
|
|
200
|
-
const updated = await User.find({})
|
|
200
|
+
const updated = await User.find({}).sort({ name: 1 })
|
|
201
201
|
expect(updated).toHaveLength(3)
|
|
202
202
|
const [alice, bob, john] = updated
|
|
203
203
|
expect(alice.role).toBe('manager')
|