mirror of
				https://github.com/langgenius/dify.git
				synced 2025-10-31 10:53:02 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			536 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			536 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { buildProviderQuery } from './_tools_util'
 | |
| 
 | |
| describe('makeProviderQuery', () => {
 | |
|   test('collectionName without special chars', () => {
 | |
|     expect(buildProviderQuery('ABC')).toBe('provider=ABC')
 | |
|   })
 | |
|   test('should escape &', () => {
 | |
|     expect(buildProviderQuery('ABC&DEF')).toBe('provider=ABC%26DEF')
 | |
|   })
 | |
|   test('should escape /', () => {
 | |
|     expect(buildProviderQuery('ABC/DEF')).toBe('provider=ABC%2FDEF')
 | |
|   })
 | |
|   test('should escape ?', () => {
 | |
|     expect(buildProviderQuery('ABC?DEF')).toBe('provider=ABC%3FDEF')
 | |
|   })
 | |
| })
 | 
