aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar natemoo-re <natemoo-re@users.noreply.github.com> 2023-10-24 18:50:46 +0000
committerGravatar astrobot-houston <fred+astrobot@astro.build> 2023-10-24 18:50:46 +0000
commit63f7242aba23c27ce3b7afef2cf5dca23d857e75 (patch)
treeaa00d46268ff485165fa11c927a1a0c0708c61b6
parentb236d88addc48d784bd60119fe45750dda900f16 (diff)
downloadastro-63f7242aba23c27ce3b7afef2cf5dca23d857e75.tar.gz
astro-63f7242aba23c27ce3b7afef2cf5dca23d857e75.tar.zst
astro-63f7242aba23c27ce3b7afef2cf5dca23d857e75.zip
[ci] format
-rw-r--r--packages/create-astro/test/typescript.test.js12
-rw-r--r--packages/create-astro/test/utils.js21
2 files changed, 16 insertions, 17 deletions
diff --git a/packages/create-astro/test/typescript.test.js b/packages/create-astro/test/typescript.test.js
index 30697bbe4..498d3384b 100644
--- a/packages/create-astro/test/typescript.test.js
+++ b/packages/create-astro/test/typescript.test.js
@@ -85,7 +85,7 @@ describe('typescript', () => {
describe('typescript: setup tsconfig', () => {
beforeEach(() => resetFixtures());
-
+
it('none', async () => {
const root = new URL('./fixtures/empty/', import.meta.url);
const tsconfig = new URL('./tsconfig.json', root);
@@ -126,11 +126,11 @@ describe('typescript: setup package', () => {
);
await setupTypeScript('strictest', { cwd: fileURLToPath(root), install: false });
const { scripts } = JSON.parse(fs.readFileSync(packageJson, { encoding: 'utf-8' }));
-
- expect(Object.keys(scripts)).to.deep.eq(['dev', 'build', 'preview'], 'does not override existing scripts');
- expect(scripts.build).to.eq(
- 'astro check && astro build',
- 'prepends astro check command'
+
+ expect(Object.keys(scripts)).to.deep.eq(
+ ['dev', 'build', 'preview'],
+ 'does not override existing scripts'
);
+ expect(scripts.build).to.eq('astro check && astro build', 'prepends astro check command');
});
});
diff --git a/packages/create-astro/test/utils.js b/packages/create-astro/test/utils.js
index f83769e0f..ee7f8af5b 100644
--- a/packages/create-astro/test/utils.js
+++ b/packages/create-astro/test/utils.js
@@ -38,17 +38,16 @@ const resetNotEmptyFixture = async () => {
const packagePath = new URL('./fixtures/not-empty/package.json', import.meta.url);
const tsconfigPath = new URL('./fixtures/not-empty/tsconfig.json', import.meta.url);
- const packageJsonData = JSON.parse(await fs.promises.readFile(packagePath, { encoding: 'utf-8' }));
- const overriddenPackageJson = Object.assign(
- packageJsonData,
- {
- scripts: {
- dev: 'astro dev',
- build: 'astro build',
- preview: 'astro preview'
- }
- }
- )
+ const packageJsonData = JSON.parse(
+ await fs.promises.readFile(packagePath, { encoding: 'utf-8' })
+ );
+ const overriddenPackageJson = Object.assign(packageJsonData, {
+ scripts: {
+ dev: 'astro dev',
+ build: 'astro build',
+ preview: 'astro preview',
+ },
+ });
return Promise.all([
fs.promises.writeFile(packagePath, JSON.stringify(overriddenPackageJson, null, 2), {