mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	Add some tests
This commit is contained in:
		
							parent
							
								
									8cbb961493
								
							
						
					
					
						commit
						2b4d63b1bb
					
				
					 1 changed files with 20 additions and 0 deletions
				
			
		
							
								
								
									
										20
									
								
								test/mfm.ts
									
										
									
									
									
								
							
							
						
						
									
										20
									
								
								test/mfm.ts
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -420,6 +420,26 @@ describe('Text', () => {
 | 
			
		|||
					text('after'),
 | 
			
		||||
				], tokens);
 | 
			
		||||
			});
 | 
			
		||||
 | 
			
		||||
			it('with brackets', () => {
 | 
			
		||||
				const tokens = analyze('[foo](https://example.com/foo(bar))');
 | 
			
		||||
				assert.deepEqual([
 | 
			
		||||
					nodeWithChildren('link', [
 | 
			
		||||
						text('foo')
 | 
			
		||||
					], { url: 'https://example.com/foo(bar)', silent: false })
 | 
			
		||||
				], tokens);
 | 
			
		||||
			});
 | 
			
		||||
 | 
			
		||||
			it('with parent brackets', () => {
 | 
			
		||||
				const tokens = analyze('([foo](https://example.com/foo(bar)))');
 | 
			
		||||
				assert.deepEqual([
 | 
			
		||||
					text('('),
 | 
			
		||||
					nodeWithChildren('link', [
 | 
			
		||||
						text('foo')
 | 
			
		||||
					], { url: 'https://example.com/foo(bar)', silent: false }),
 | 
			
		||||
					text(')')
 | 
			
		||||
				], tokens);
 | 
			
		||||
			});
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
		it('emoji', () => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue