(body: string)
| 445 | |
| 446 | describe('scanDynamicDispatch — dynamic import arguments (#1967)', () => { |
| 447 | const forms = (body: string): string[] => |
| 448 | scanDynamicDispatch(body, 'typescript', 1).map((m) => m.form); |
| 449 | |
| 450 | it('flags an import built from a template literal with a substitution', () => { |
| 451 | expect(forms('async function load(lang) {\n return import(`./locales/${lang}.js`);\n}')).toEqual(['dynamic-import']); |
no test coverage detected