diff --git a/packages/astro/tests/jest/astrov1.test.ts b/packages/astro/tests/jest/astrov1.test.ts deleted file mode 100644 index 1f0a4ced..00000000 --- a/packages/astro/tests/jest/astrov1.test.ts +++ /dev/null @@ -1,50 +0,0 @@ -import path from 'path'; -import FastGlob from 'fast-glob'; -import fs from 'fs'; -import fse from 'fs-extra'; -import TestUtils from '../../../../tests/TestUtils'; -import { execSync } from 'child_process'; - -const testName = 'astrov1'; -const testUtils = new TestUtils('astro', testName); - -const bundleTestDir = testUtils.getTestDir(); -const buildTmpDir = path.join(testUtils.getTmpDir(), testUtils.getTestName() + '-build'); - -if (!fs.existsSync(buildTmpDir)) { - fs.mkdirSync(buildTmpDir, {recursive: true}); -} - -fse.copySync(path.join(bundleTestDir, 'input'), buildTmpDir); - -execSync(`pnpm install . && pnpm build .`, {stdio: 'inherit', cwd: buildTmpDir}); - -const indexHtmlPart = ` - -

Layout

-

Hello World!

Another text

Subtitle

- -`.trim(); - -const secondHtmlPart = ` - -

Layout

-

Hello World 2!

Subtitle

- -`.trim(); - -const cssFilePart = ':root{--blue: darkblue}.a{color:orange}.d{color:#00008b}.g{color:purple}.l{color:lightpurple}.b{font-size:24px}.e{font-size:48px}.k{font-size:12px}.j{font-weight:700}.f{margin-top:24px}.c{text-align:center}@media (min-width: 1024px){.h{color:darkpurple}.i{font-size:24px}}'; - -test('Astro v1', async (): Promise => { - const [indexHtmlFileEntry] = FastGlob.sync(path.join(buildTmpDir, 'dist', 'index.html')); - const [secondHtmlFileEntry] = FastGlob.sync(path.join(buildTmpDir, 'dist', 'second', 'index.html')); - const [cssFileEntry] = FastGlob.sync(path.join(buildTmpDir, 'dist', 'assets', '*.css')); - - const indexHtmlFileContent = testUtils.readFile(indexHtmlFileEntry); - const secondHtmlFileContent = testUtils.readFile(secondHtmlFileEntry); - const cssFileContent = testUtils.readFile(cssFileEntry); - - expect(indexHtmlFileContent.includes(indexHtmlPart)).toBeTruthy(); - expect(secondHtmlFileContent.includes(secondHtmlPart)).toBeTruthy(); - expect(cssFileContent.includes(cssFilePart)).toBeTruthy(); -}); diff --git a/packages/astro/tests/jest/astrov1/input/.gitignore b/packages/astro/tests/jest/astrov1/input/.gitignore deleted file mode 100644 index 5a1b2e74..00000000 --- a/packages/astro/tests/jest/astrov1/input/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# build output -dist/ -.output/ -src/styles/stylify.css -yarn.lock - -# dependencies -node_modules/ - -# logs -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* - - -# environment variables -.env -.env.production - -# macOS-specific files -.DS_Store diff --git a/packages/astro/tests/jest/astrov1/input/astro.config.mjs b/packages/astro/tests/jest/astrov1/input/astro.config.mjs deleted file mode 100644 index bfea1691..00000000 --- a/packages/astro/tests/jest/astrov1/input/astro.config.mjs +++ /dev/null @@ -1,16 +0,0 @@ -import { defineConfig } from 'astro/config'; -import stylify from '@stylify/astro'; - - -// https://astro.build/config -export default defineConfig({ - integrations: [stylify({ - compiler: { - mangleSelectors: true - } - })], - server: { - host: '0.0.0.0', - port: 3000 - } -}); diff --git a/packages/astro/tests/jest/astrov1/input/package.json b/packages/astro/tests/jest/astrov1/input/package.json deleted file mode 100644 index a029acd3..00000000 --- a/packages/astro/tests/jest/astrov1/input/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "@example/basics", - "version": "0.0.1", - "private": true, - "scripts": { - "dev": "astro dev", - "start": "astro dev", - "build": "astro build", - "preview": "astro preview", - "astro": "astro" - }, - "dependencies": { - "@stylify/astro": "workspace:^", - "@stylify/stylify": "workspace:^", - "astro": "^1.2" - } -} diff --git a/packages/astro/tests/jest/astrov1/input/src/components/Subtitle.astro b/packages/astro/tests/jest/astrov1/input/src/components/Subtitle.astro deleted file mode 100644 index 79ab1c4b..00000000 --- a/packages/astro/tests/jest/astrov1/input/src/components/Subtitle.astro +++ /dev/null @@ -1 +0,0 @@ -

Subtitle

diff --git a/packages/astro/tests/jest/astrov1/input/src/layouts/Layout.astro b/packages/astro/tests/jest/astrov1/input/src/layouts/Layout.astro deleted file mode 100644 index 5efa739e..00000000 --- a/packages/astro/tests/jest/astrov1/input/src/layouts/Layout.astro +++ /dev/null @@ -1,22 +0,0 @@ ---- -export interface Props { - title: string; -} - -const { title } = Astro.props; ---- - - - - - - - - - {title} - - -

Layout

- - - diff --git a/packages/astro/tests/jest/astrov1/input/src/pages/index.astro b/packages/astro/tests/jest/astrov1/input/src/pages/index.astro deleted file mode 100644 index 2ef3445d..00000000 --- a/packages/astro/tests/jest/astrov1/input/src/pages/index.astro +++ /dev/null @@ -1,11 +0,0 @@ ---- -import Subtitle from '../components/Subtitle.astro'; -import Layout from '../layouts/Layout.astro'; ---- - - -

Hello World!

-

-

Another text

- -
diff --git a/packages/astro/tests/jest/astrov1/input/src/pages/second.astro b/packages/astro/tests/jest/astrov1/input/src/pages/second.astro deleted file mode 100644 index c2faf2f5..00000000 --- a/packages/astro/tests/jest/astrov1/input/src/pages/second.astro +++ /dev/null @@ -1,9 +0,0 @@ ---- -import Subtitle from '../components/Subtitle.astro'; -import Layout from '../layouts/Layout.astro'; ---- - - -

Hello World 2!

- -
diff --git a/packages/astro/tests/jest/astrov1/input/stylify.config.mjs b/packages/astro/tests/jest/astrov1/input/stylify.config.mjs deleted file mode 100644 index ca597c85..00000000 --- a/packages/astro/tests/jest/astrov1/input/stylify.config.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import { defineConfig } from '@stylify/astro'; - -export default defineConfig({ - compiler: { - variables: { - blue: 'darkblue' - }, - cssVariablesEnabled: false - } -}); diff --git a/packages/astro/tests/jest/astrov1/input/tsconfig.json b/packages/astro/tests/jest/astrov1/input/tsconfig.json deleted file mode 100644 index d78f81ec..00000000 --- a/packages/astro/tests/jest/astrov1/input/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "astro/tsconfigs/base" -}