1 | import CallLog from '../value/call-log'
|
2 | import Call from '../value/call'
|
3 | import satisfy from '../satisfy'
|
4 |
|
5 | export default function generateFakeFunction (double) {
|
6 | const testDouble = function testDouble (...args) {
|
7 | const call = new Call(this, args)
|
8 | CallLog.instance.log(double, call)
|
9 | return satisfy(double, call)
|
10 | }
|
11 | testDouble.toString = double.toString.bind(double)
|
12 |
|
13 | return testDouble
|
14 | }
|