Handle mini notation without S
This commit is contained in:
parent
a5c4fd5bc1
commit
e92865cecb
2 changed files with 68 additions and 12 deletions
|
|
@ -26,6 +26,15 @@ describe('transpiler', () => {
|
|||
it('adds await to bare samples call', () => {
|
||||
expect(transpiler("samples('xxx');", simple).output).toEqual("await samples('xxx');");
|
||||
});
|
||||
it('treats mini strings in K(...) as strudel', () => {
|
||||
expect(transpiler('K("bd")', simple).output).toEqual("worklet('pat[0]', m('bd', 2));");
|
||||
});
|
||||
it('treats K(...) as kabelsalat', () => {
|
||||
expect(transpiler('K(1+2)', simple).output).toEqual("worklet('1 + 2');");
|
||||
});
|
||||
it('handles strudel S(...) inside kabelsalat K(...)', () => {
|
||||
expect(transpiler('K(S("bd"))', simple).output).toEqual("worklet('pat[0]', m('bd', 4));");
|
||||
});
|
||||
/* it('parses dynamic imports', () => {
|
||||
expect(
|
||||
transpiler("const { default: foo } = await import('https://bar.com/foo.js');", {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue