diff --git a/packages/astro/test/astro-expr.test.js b/packages/astro/test/astro-expr.test.js index 505bf2845..c474c1d3d 100644 --- a/packages/astro/test/astro-expr.test.js +++ b/packages/astro/test/astro-expr.test.js @@ -82,4 +82,11 @@ Expressions('Does not render falsy values using &&', async ({ runtime }) => { assert.equal($('#undefined').length, 0, `Expected {undefined && } not to render`); }); +Expressions.only('Followed by an element', async ({ runtime }) => { + const result = await runtime.load('/before-el'); + if (result.error) throw new Error(result.error); + + console.log(result.contents); +}); + Expressions.run(); diff --git a/packages/astro/test/fixtures/astro-expr/src/pages/before-el.astro b/packages/astro/test/fixtures/astro-expr/src/pages/before-el.astro new file mode 100644 index 000000000..e9f70f587 --- /dev/null +++ b/packages/astro/test/fixtures/astro-expr/src/pages/before-el.astro @@ -0,0 +1,15 @@ +--- +let title = 'My App'; + +let colors = ['red', 'yellow', 'blue']; +--- + + + + {title} + + + {true ? colors.map(color =>
{color}
) : null} + Something + + \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 5be83d7fa..8e9dcb2e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1483,6 +1483,11 @@ resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-5.0.3.tgz#e7b5aebbac150f8b5fdd4a46e7f0bd8e65e19109" integrity sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw== +"@types/prettier@^2.2.1": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.3.0.tgz#2e8332cc7363f887d32ec5496b207d26ba8052bb" + integrity sha512-hkc1DATxFLQo4VxPDpMH1gCkPpBbpOoJ/4nhuXw4n63/0R6bCpQECj4+K226UJ4JO/eJQz+1mC2I7JsWanAdQw== + "@types/prompts@^2.0.12": version "2.0.12" resolved "https://registry.yarnpkg.com/@types/prompts/-/prompts-2.0.12.tgz#5cc1557f88e4d69dad93230fff97a583006f858b"