mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 22:53:05 -03:00
Reorganize tests into a real spec suite
This commit is contained in:
16
spec/tests/react/test_aria_attribute.txt
Normal file
16
spec/tests/react/test_aria_attribute.txt
Normal file
@ -0,0 +1,16 @@
|
||||
---input---
|
||||
<button aria-label="Submit">Submit</button>
|
||||
|
||||
---tokens---
|
||||
'<' Punctuation
|
||||
'button' Name.Tag
|
||||
' ' Text.Whitespace
|
||||
'aria-label' Name.Attribute
|
||||
'=' Operator
|
||||
'"Submit"' Literal.String
|
||||
'>' Punctuation
|
||||
'Submit' Name.Other
|
||||
'</' Punctuation
|
||||
'button' Name.Tag
|
||||
'>' Punctuation
|
||||
'\n' Text.Whitespace
|
25
spec/tests/react/test_arrow_function_attribute.txt
Normal file
25
spec/tests/react/test_arrow_function_attribute.txt
Normal file
@ -0,0 +1,25 @@
|
||||
---input---
|
||||
<button onClick={e => e.preventDefault ()} />
|
||||
|
||||
---tokens---
|
||||
'<' Punctuation
|
||||
'button' Name.Tag
|
||||
' ' Text.Whitespace
|
||||
'onClick' Name.Attribute
|
||||
'=' Operator
|
||||
'{' Punctuation
|
||||
'e' Name.Other
|
||||
' ' Text.Whitespace
|
||||
'=>' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'e' Name.Other
|
||||
'.' Punctuation
|
||||
'preventDefault' Name.Other
|
||||
' ' Text.Whitespace
|
||||
'(' Punctuation
|
||||
')' Punctuation
|
||||
'}' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'/' Punctuation
|
||||
'>' Punctuation
|
||||
'\n' Text.Whitespace
|
15
spec/tests/react/test_fragment.txt
Normal file
15
spec/tests/react/test_fragment.txt
Normal file
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
<React.Fragment></React.Fragment>
|
||||
|
||||
---tokens---
|
||||
'<' Punctuation
|
||||
'React' Name.Tag
|
||||
'.' Punctuation
|
||||
'Fragment' Name.Attribute
|
||||
'>' Punctuation
|
||||
'</' Punctuation
|
||||
'React' Name.Tag
|
||||
'.' Punctuation
|
||||
'Fragment' Name.Attribute
|
||||
'>' Punctuation
|
||||
'\n' Text.Whitespace
|
25
spec/tests/react/test_function_returning_jsx.text
Normal file
25
spec/tests/react/test_function_returning_jsx.text
Normal file
@ -0,0 +1,25 @@
|
||||
---input---
|
||||
<Component wrapped={data => <User name={data.name} />} />
|
||||
|
||||
---tokens---
|
||||
'<' Token.Punctuation
|
||||
'Component' Token.Name.Tag
|
||||
'wrapped' Token.Name.Attribute
|
||||
'=' Token.Operator
|
||||
'{' Token.Punctuation
|
||||
'data' Token.Name.Other
|
||||
'=>' Token.Punctuation
|
||||
'<' Token.Punctuation
|
||||
'User' Token.Name.Tag
|
||||
'name' Token.Name.Attribute
|
||||
'=' Token.Operator
|
||||
'{' Token.Punctuation
|
||||
'data' Token.Name.Other
|
||||
'.' Token.Punctuation
|
||||
'name' Token.Name.Other
|
||||
'}' Token.Punctuation
|
||||
'/' Token.Punctuation
|
||||
'>' Token.Punctuation
|
||||
'}' Token.Punctuation
|
||||
'/' Token.Punctuation
|
||||
'>' Token.Punctuation
|
22
spec/tests/react/test_multiple_attributes.txt
Normal file
22
spec/tests/react/test_multiple_attributes.txt
Normal file
@ -0,0 +1,22 @@
|
||||
---input---
|
||||
<User name={'john'} last={'doe'} />
|
||||
|
||||
---tokens---
|
||||
'<' Punctuation
|
||||
'User' Name.Tag
|
||||
' ' Text.Whitespace
|
||||
'name' Name.Attribute
|
||||
'=' Operator
|
||||
'{' Punctuation
|
||||
"'john'" Literal.String.Single
|
||||
'}' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'last' Name.Attribute
|
||||
'=' Operator
|
||||
'{' Punctuation
|
||||
"'doe'" Literal.String.Single
|
||||
'}' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'/' Punctuation
|
||||
'>' Punctuation
|
||||
'\n' Text.Whitespace
|
23
spec/tests/react/test_object_attribute.txt
Normal file
23
spec/tests/react/test_object_attribute.txt
Normal file
@ -0,0 +1,23 @@
|
||||
---input---
|
||||
<div style={{ color: 'red' }} />
|
||||
|
||||
---tokens---
|
||||
'<' Punctuation
|
||||
'div' Name.Tag
|
||||
' ' Text.Whitespace
|
||||
'style' Name.Attribute
|
||||
'=' Operator
|
||||
'{' Punctuation
|
||||
'{' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'color' Name.Other
|
||||
':' Operator
|
||||
' ' Text.Whitespace
|
||||
"'red'" Literal.String.Single
|
||||
' ' Text.Whitespace
|
||||
'}' Punctuation
|
||||
'}' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'/' Punctuation
|
||||
'>' Punctuation
|
||||
'\n' Text.Whitespace
|
7
spec/tests/react/test_short_syntax.txt
Normal file
7
spec/tests/react/test_short_syntax.txt
Normal file
@ -0,0 +1,7 @@
|
||||
---input---
|
||||
<></>
|
||||
|
||||
---tokens---
|
||||
'<>' Punctuation
|
||||
'</>' Punctuation
|
||||
'\n' Text.Whitespace
|
Reference in New Issue
Block a user