add emitMiniLocations flag to transpiler

This commit is contained in:
Felix Roos 2023-07-02 13:42:41 +02:00
parent d686b65dbe
commit 5f271ed127
3 changed files with 31 additions and 9 deletions

View file

@ -36,4 +36,12 @@ describe('transpiler', () => {
}),
).toEqual("const {default: foo} = await import('https://bar.com/foo.js');");
}); */
it('collections locations', () => {
const { miniLocations } = transpiler(`s("bd", "hh oh")`, { ...simple, emitMiniLocations: true });
expect(miniLocations).toEqual([
[3, 5],
[9, 11],
[12, 14],
]);
});
});