chore: todos
This commit is contained in:
		
							parent
							
								
									65118327ff
								
							
						
					
					
						commit
						020e109abd
					
				| @ -8,11 +8,13 @@ describe('compiler:sfc', () => { | |||||||
|     test('style block', () => { |     test('style block', () => { | ||||||
|       const style = parse(`<style>\n.color {\n color: red;\n }\n</style>\n`) |       const style = parse(`<style>\n.color {\n color: red;\n }\n</style>\n`) | ||||||
|         .styles[0] |         .styles[0] | ||||||
|  |       // TODO need to actually test this with SourceMapConsumer
 | ||||||
|       expect(style.map).not.toBeUndefined() |       expect(style.map).not.toBeUndefined() | ||||||
|     }) |     }) | ||||||
| 
 | 
 | ||||||
|     test('script block', () => { |     test('script block', () => { | ||||||
|       const script = parse(`<script>\nconsole.log(1)\n }\n</script>\n`).script |       const script = parse(`<script>\nconsole.log(1)\n }\n</script>\n`).script | ||||||
|  |       // TODO need to actually test this with SourceMapConsumer
 | ||||||
|       expect(script!.map).not.toBeUndefined() |       expect(script!.map).not.toBeUndefined() | ||||||
|     }) |     }) | ||||||
|   }) |   }) | ||||||
|  | |||||||
| @ -74,6 +74,7 @@ export function parse( | |||||||
|     styles: [], |     styles: [], | ||||||
|     customBlocks: [] |     customBlocks: [] | ||||||
|   } |   } | ||||||
|  | 
 | ||||||
|   const ast = baseParse(source, { |   const ast = baseParse(source, { | ||||||
|     isNativeTag: () => true, |     isNativeTag: () => true, | ||||||
|     getTextMode: () => TextModes.RAWTEXT |     getTextMode: () => TextModes.RAWTEXT | ||||||
| @ -86,6 +87,7 @@ export function parse( | |||||||
|     if (!node.children.length) { |     if (!node.children.length) { | ||||||
|       return |       return | ||||||
|     } |     } | ||||||
|  |     // TODO handle pad option
 | ||||||
|     switch (node.tag) { |     switch (node.tag) { | ||||||
|       case 'template': |       case 'template': | ||||||
|         if (!sfc.template) { |         if (!sfc.template) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user