-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.bar.js
34 lines (34 loc) · 1.13 KB
/
test.bar.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
/** @type { import("../../handlers").test } */
module.exports = function test() {
return {
bar: function(test, bus, run) {
return run(test, bus, [
'Generate admin user',
'Login admin user',
{
name: 'addBar',
method: 'microservice.bar.add',
params: {
bar: {
barName: 'watch'
}
},
result(result, assert) {
// bus.log.table(result);
assert.ok(result.bar.barId, 'Return barId');
}
}, {
name: 'getBar',
method: 'microservice.bar.get',
params: ({addBar: {bar: {barId}}}) => ({barId}),
result(result, assert) {
assert.match(result, {
bar: {barName: 'watch'}
});
}
},
'Logout admin user'
]);
}
};
};