diff options
author | 2021-05-28 22:03:05 +0000 | |
---|---|---|
committer | 2021-05-28 22:03:05 +0000 | |
commit | 630c36f3516bb500ca6a4bfe84c972b1093b8177 (patch) | |
tree | fb9d9aeb65c39165488160663266ad6c29c07d34 | |
parent | 3d20623c32768f9224ca8e33888b761f957fff61 (diff) | |
download | astro-630c36f3516bb500ca6a4bfe84c972b1093b8177.tar.gz astro-630c36f3516bb500ca6a4bfe84c972b1093b8177.tar.zst astro-630c36f3516bb500ca6a4bfe84c972b1093b8177.zip |
[ci] yarn format
-rw-r--r-- | packages/astro/src/compiler/codegen/index.ts | 2 | ||||
-rw-r--r-- | packages/astro/test/astro-expr.test.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/packages/astro/src/compiler/codegen/index.ts b/packages/astro/src/compiler/codegen/index.ts index 9271ab50a..fa00e8c99 100644 --- a/packages/astro/src/compiler/codegen/index.ts +++ b/packages/astro/src/compiler/codegen/index.ts @@ -422,7 +422,7 @@ function dedent(str: string) { return !arr || !first ? str : str.replace(new RegExp(`^[ \\t]{0,${first}}`, 'gm'), ''); } -const FALSY_EXPRESSIONS = new Set(['false','null','undefined','void 0']); +const FALSY_EXPRESSIONS = new Set(['false', 'null', 'undefined', 'void 0']); /** Compile page markup */ async function compileHtml(enterNode: TemplateNode, state: CodegenState, compileOptions: CompileOptions): Promise<string> { diff --git a/packages/astro/test/astro-expr.test.js b/packages/astro/test/astro-expr.test.js index 04a005aae..485d58d9b 100644 --- a/packages/astro/test/astro-expr.test.js +++ b/packages/astro/test/astro-expr.test.js @@ -61,9 +61,9 @@ Expressions('Allows multiple JSX children in mustache', async ({ runtime }) => { Expressions('Does not render falsy values using &&', async ({ runtime }) => { const result = await runtime.load('/falsy'); if (result.error) throw new Error(result.error); - + const $ = doc(result.contents); - + assert.equal($('#true').length, 1, `Expected {true && <span id="true" />} to render`); assert.equal($('#zero').text(), '0', `Expected {0 && "VALUE"} to render "0"`); assert.equal($('#false').length, 0, `Expected {false && <span id="false" />} not to render`); |