test: fix BitbucketRepoPicker tests

Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
This commit is contained in:
Benjamin Janssens
2024-07-15 11:15:21 +02:00
parent 9a5e7f1c36
commit c4a4a69912
@@ -27,9 +27,11 @@ import { act } from 'react-dom/test-utils';
describe('BitbucketRepoPicker', () => {
const scaffolderApiMock: Partial<ScaffolderApi> = {
autocomplete: jest.fn().mockImplementation(opts => ({
results: [{ title: `${opts.resource}_example` }],
})),
autocomplete: jest.fn().mockImplementation(opts =>
Promise.resolve({
results: [{ title: `${opts.resource}_example` }],
}),
),
};
it('renders a select if there is a list of allowed owners', async () => {