forked from intercellular/cell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spy.js
34 lines (34 loc) · 949 Bytes
/
spy.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
const sinon = require('sinon')
const {Phenotype, Genotype, Nucleus, Membrane, Gene, God} = require("../cell")
module.exports = {
Genotype: {
set: sinon.spy(Genotype, "set"),
update: sinon.spy(Genotype, "update")
},
O: {
defineProperty: sinon.spy(Object, "defineProperty"),
getOwnPropertyDescriptor: sinon.spy(Object, "getOwnPropertyDescriptor")
},
Gene: {
freeze: sinon.spy(Gene, "freeze")
},
Membrane: {
inject: sinon.spy(Membrane, "inject"),
add: sinon.spy(Membrane, "add")
},
God: {
create: sinon.spy(God, "create"),
detect: sinon.spy(God, "detect")
},
Phenotype: {
$init: sinon.spy(Phenotype, "$init"),
$update: sinon.spy(Phenotype, "$update"),
$type: sinon.spy(Phenotype, "$type"),
$components: sinon.spy(Phenotype, "$components"),
set: sinon.spy(Phenotype, "set")
},
Nucleus: {
bind: sinon.spy(Nucleus, "bind"),
queue: sinon.spy(Nucleus, "queue")
}
}