-
Notifications
You must be signed in to change notification settings - Fork 0
/
dumpinator-next.conf.js
65 lines (58 loc) · 1.03 KB
/
dumpinator-next.conf.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
'use strict';
module.exports = function (dumpinator) {
dumpinator.setDefaults({
left: {
hostname: 'http://localhost:3333'
},
right: {
hostname: 'http://localhost:3333'
},
status: 200,
ignoreBody: [
'properties.price',
'properties.age'
],
ignoreHeader: [
]
});
dumpinator.before(() => {
console.log('Before all');
});
dumpinator.after(() => {
console.log('After all');
});
dumpinator.route({
url: '/v1/test.json'
}).before(() => {
console.log('Before first route');
}).after(() => {
console.log('After first route');
});
dumpinator.route({
url: '/v2/test.json',
status: 204
});
dumpinator.route([{
left: {
url: '/v1/banana.json'
},
right: {
url: '/v2/banana.json'
}
}]);
};
const newConfig = {
routes: [{
left: {
url: 'http://left',
headers: {
accept: 'application/json'
}
},
right: {
url: 'http://left'
},
before: () => {},
after: () => {}
}]
};