-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.js
41 lines (36 loc) · 937 Bytes
/
data.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
'use strict'
// =========
// Test Data
// =========
const before = {
_id: 'user1',
group: [
{ _id: 'group1', tags: ['drink', 'food'] },
{ _id: 'group2', tags: ['fun', 'party'] }
],
is_active: true,
__v: 0
}
const after = {
_id: 'user1',
group: [
{ _id: 'group1', tags: ['drink', 'food'] },
{ _id: 'group2', tags: ['fun'] },
{ _id: 'group3', tags: [] }
],
rewards: [],
is_active: true,
__v: 1
}
const original = ['google', 'apple', 'facebook', 'amazon']
const identical = ['google', 'apple', 'facebook', 'amazon']
const del = ['google', 'apple', 'facebook']
const add = ['google', 'apple', 'facebook', 'amazon', 'microsoft']
const move = ['amazon', 'google', 'apple', 'facebook']
const replace = ['google', 'microsoft', 'facebook', 'amazon']
const arrO = [
{ _id: 'el', name: 'google' },
{ _id: 'th', name: 'apple' },
{ _id: 'ha', name: 'facebook' },
{ _id: 'hu', name: 'amazon' }
]