|
1 | 1 | import ts from 'typescript';
|
2 |
| -import { findAllNodes, findNode } from './utilily-functions'; |
| 2 | +import { findAllNodes } from './utilily-functions'; |
3 | 3 | import type { TagConfig, StrictTagCondition } from './types';
|
4 |
| -import { parseTagConfig, getTemplateNodeUnder, isTagged, getTagName } from './tag-utils'; |
| 4 | +import { parseTagConfig, getTemplateNodeUnder, getTagName } from './tag-utils'; |
5 | 5 |
|
6 | 6 | describe(parseTagConfig, () => {
|
7 | 7 | test.each([
|
@@ -190,23 +190,3 @@ describe(getTagName, () => {
|
190 | 190 | expect(actual).toBe(undefined);
|
191 | 191 | });
|
192 | 192 | });
|
193 |
| - |
194 |
| -describe(isTagged, () => { |
195 |
| - it('should return true when the tag condition is matched', () => { |
196 |
| - // prettier-ignore |
197 |
| - const text = 'function myTag(...args: any[]) { return "" }' + '\n' |
198 |
| - + 'const x = myTag`query { }`'; |
199 |
| - const s = ts.createSourceFile('input.ts', text, ts.ScriptTarget.Latest, true); |
200 |
| - const node = findNode(s, text.length - 3) as ts.Node; |
201 |
| - expect(isTagged(node, 'myTag')).toBeTruthy(); |
202 |
| - }); |
203 |
| - |
204 |
| - it('should return true when the tag condition is not matched', () => { |
205 |
| - // prettier-ignore |
206 |
| - const text = 'function myTag(...args: any[]) { return "" }' + '\n' |
207 |
| - + 'const x = myTag`query { }`'; |
208 |
| - const s = ts.createSourceFile('input.ts', text, ts.ScriptTarget.Latest, true); |
209 |
| - const node = findNode(s, text.length - 3) as ts.Node; |
210 |
| - expect(isTagged(node, 'MyTag')).toBeFalsy(); |
211 |
| - }); |
212 |
| -}); |
0 commit comments