Skip to content

Commit 1ece254

Browse files
committed
Fix test with new resolver
1 parent e394259 commit 1ece254

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/core/server/http/router/request.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ describe('KibanaRequest', () => {
102102
const kibanaRequest = KibanaRequest.from(request, {
103103
params: schema.object({ id: schema.string() }),
104104
query: schema.object({ search: schema.string() }),
105-
body: data => {
105+
body: ({ ok, fail }, data) => {
106106
if (Buffer.isBuffer(data)) {
107-
return { value: data };
107+
return ok(data);
108108
} else {
109-
return { error: new RouteValidationError('It should be a Buffer', []) };
109+
return fail('It should be a Buffer', []);
110110
}
111111
},
112112
});

0 commit comments

Comments
 (0)