@ryusei/light
Version:
<div align="center"> <a href="https://light.ryuseijs.com"> <img alt="RyuseiLight" src="https://light.ryuseijs.com/images/svg/logo.svg" width="70"> </a>
22 lines (17 loc) • 580 B
JavaScript
import {
CATEGORY_BRACKET, CATEGORY_CLASS, CATEGORY_DELIMITER,
} from '../../../constants/categories';
describe( 'jsx', () => {
test( 'can tokenize a tag name as a class if it stats with an uppercase character.', () => {
const jsx = `<Component></Component>`;
expect( jsx ).toBeTokenized( 'jsx', [
[ CATEGORY_BRACKET, '<' ],
[ CATEGORY_CLASS, 'Component' ],
[ CATEGORY_BRACKET, '>' ],
[ CATEGORY_BRACKET, '<' ],
[ CATEGORY_DELIMITER, '/' ],
[ CATEGORY_CLASS, 'Component' ],
[ CATEGORY_BRACKET, '>' ],
] );
} );
} );