|
1 | 1 | import { assert } from 'chai'; |
2 | | -import { getTokenOnCharRange, hasScope, tokenizeLine } from './test.utils'; |
| 2 | +import { getTokenOnCharRange, hasScope, tokenizeLine, writeOut } from './test.utils'; |
3 | 3 |
|
4 | 4 | describe('The Aurelia HTML syntax compile-spy attribute', () => { |
5 | 5 |
|
@@ -47,7 +47,7 @@ describe('The Aurelia HTML syntax compile-spy attribute', () => { |
47 | 47 |
|
48 | 48 | }); |
49 | 49 |
|
50 | | - it('must not tokenize foo-containerles="" attribute', () => { |
| 50 | + it('must not tokenize foo-compile-spy="" attribute', () => { |
51 | 51 |
|
52 | 52 | // arrange |
53 | 53 | let scope = 'compile-spy.attribute.html.au'; |
@@ -91,4 +91,20 @@ describe('The Aurelia HTML syntax compile-spy attribute', () => { |
91 | 91 | assert.isNotOk(hasScope(token.scopes, scope)); |
92 | 92 |
|
93 | 93 | }); |
| 94 | + |
| 95 | + it('must tokenize compile-spy attribute', () => { |
| 96 | + |
| 97 | + // arrange |
| 98 | + let scope = 'compile-spy.attribute.html.au'; |
| 99 | + |
| 100 | + // act |
| 101 | + let template = '<template compile-spy></template>'; |
| 102 | + let lineToken = tokenizeLine(template); |
| 103 | + |
| 104 | + // assert |
| 105 | + let token = getTokenOnCharRange(lineToken, 10, 21); |
| 106 | + assert.isDefined(token); |
| 107 | + assert.isOk(hasScope(token.scopes, scope)); |
| 108 | + |
| 109 | + }); |
94 | 110 | }); |
0 commit comments