mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
[ci] format
This commit is contained in:
parent
45bff6fccb
commit
a89963ed46
2 changed files with 3 additions and 3 deletions
|
@ -15,7 +15,7 @@ function includesExport(code: string) {
|
||||||
|
|
||||||
// Support quoted values to allow statically known `import.meta.env` variables to be used
|
// Support quoted values to allow statically known `import.meta.env` variables to be used
|
||||||
function isQuoted(value: string) {
|
function isQuoted(value: string) {
|
||||||
return (value[0] === '"' || value[0] === "'") && value[value.length - 1] === value[0]
|
return (value[0] === '"' || value[0] === "'") && value[value.length - 1] === value[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
function isTruthy(value: string) {
|
function isTruthy(value: string) {
|
||||||
|
|
|
@ -17,7 +17,7 @@ describe('astro scan', () => {
|
||||||
expect(result.prerender).to.equal(false);
|
expect(result.prerender).to.equal(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('recognizes single quoted boolean (\'true\')', async () => {
|
it("recognizes single quoted boolean ('true')", async () => {
|
||||||
const result = await scan(`export const prerender = 'true';`, '/src/components/index.astro');
|
const result = await scan(`export const prerender = 'true';`, '/src/components/index.astro');
|
||||||
expect(result.prerender).to.equal(true);
|
expect(result.prerender).to.equal(true);
|
||||||
});
|
});
|
||||||
|
@ -32,7 +32,7 @@ describe('astro scan', () => {
|
||||||
expect(result.prerender).to.equal(false);
|
expect(result.prerender).to.equal(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('recognizes single quoted boolean (\'false\')', async () => {
|
it("recognizes single quoted boolean ('false')", async () => {
|
||||||
const result = await scan(`export const prerender = 'false';`, '/src/components/index.astro');
|
const result = await scan(`export const prerender = 'false';`, '/src/components/index.astro');
|
||||||
expect(result.prerender).to.equal(false);
|
expect(result.prerender).to.equal(false);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue