File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,10 @@ export const documentTranslationTestTimeout = 10000;
199199// E2E tests need a significantly higher timeout limit
200200export const testTimeout = 60000 ;
201201
202+ // Base URL for mocking out HTTP client
203+ export const urlToMockRegexp =
204+ / ( h t t p s ? : \/ \/ a p i .* \. d e e p l \. c o m ) | ( d e e p l - m o c k : \d + ) | ( h t t p s ? : \/ \/ l o c a l h o s t : \d + ) / ;
205+
202206module . exports = {
203207 exampleText,
204208 exampleDocumentInput,
@@ -213,5 +217,6 @@ module.exports = {
213217 documentTranslationTestTimeout,
214218 testTimeout,
215219 timeout,
220+ urlToMockRegexp,
216221 proxyConfig,
217222} ;
Original file line number Diff line number Diff line change @@ -15,11 +15,10 @@ import {
1515 withMockProxyServer ,
1616 makeTranslator ,
1717 proxyConfig ,
18+ urlToMockRegexp ,
1819} from './core' ;
1920
2021const serverUrl = process . env . DEEPL_SERVER_URL ;
21- const urlToMockRegexp =
22- / ( h t t p s ? : \/ \/ a p i .* \. d e e p l \. c o m ) | ( d e e p l - m o c k : \d + ) | ( h t t p s ? : \/ \/ l o c a l h o s t : \d + ) / ;
2322
2423describe ( 'general' , ( ) => {
2524 it ( 'rejects empty authKey' , ( ) => {
You can’t perform that action at this time.
0 commit comments