mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-08 14:35:03 +00:00
feat: add default http protocol when URL scheme is missing (#7786)
--------- Co-authored-by: Pragadesh-45 <temporaryg7904@gmail.com> Co-authored-by: Sid <siddharth@usebruno.com>
This commit is contained in:
@@ -68,14 +68,18 @@ jest.mock('../../src/store/tokenStore', () => ({
|
||||
|
||||
// Default: no prompt variables detected
|
||||
const mockExtractPromptVariables = jest.fn(() => []);
|
||||
jest.mock('@usebruno/common', () => ({
|
||||
utils: {
|
||||
encodeUrl: jest.fn((u) => u),
|
||||
buildFormUrlEncodedPayload: jest.fn(),
|
||||
extractPromptVariables: mockExtractPromptVariables,
|
||||
isFormData: jest.fn(() => false)
|
||||
}
|
||||
}));
|
||||
jest.mock('@usebruno/common', () => {
|
||||
const ogUtils = jest.requireActual('@usebruno/common').utils;
|
||||
return {
|
||||
utils: {
|
||||
encodeUrl: jest.fn((u) => u),
|
||||
buildFormUrlEncodedPayload: jest.fn(),
|
||||
extractPromptVariables: mockExtractPromptVariables,
|
||||
isFormData: jest.fn(() => false),
|
||||
hasExplicitScheme: ogUtils.hasExplicitScheme
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
const prepareRequest = require('../../src/runner/prepare-request');
|
||||
const { makeAxiosInstance } = require('../../src/utils/axios-instance');
|
||||
|
||||
Reference in New Issue
Block a user