Home / File/ invalid-css.test.js — astro Source File

invalid-css.test.js — astro Source File

Architecture documentation for invalid-css.test.js, a javascript file in the astro codebase. 6 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  7527755b_e17c_736c_e973_19f53524a009["invalid-css.test.js"]
  50691d25_e21b_5888_b66f_8255fd270df0["../../../dist/core/compile/index.js"]
  7527755b_e17c_736c_e973_19f53524a009 --> 50691d25_e21b_5888_b66f_8255fd270df0
  2e416dab_be5a_3320_ad78_477d5da20f4f["../../../dist/core/errors/index.js"]
  7527755b_e17c_736c_e973_19f53524a009 --> 2e416dab_be5a_3320_ad78_477d5da20f4f
  e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607["strict"]
  7527755b_e17c_736c_e973_19f53524a009 --> e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607
  6b0635f9_51ea_77aa_767b_7857878e98a6["node:test"]
  7527755b_e17c_736c_e973_19f53524a009 --> 6b0635f9_51ea_77aa_767b_7857878e98a6
  d9a92db9_c95e_9165_13ac_24b3d859d946["node:url"]
  7527755b_e17c_736c_e973_19f53524a009 --> d9a92db9_c95e_9165_13ac_24b3d859d946
  263e522e_1aa5_ebc3_e7d6_45ebc51671f7["vite"]
  7527755b_e17c_736c_e973_19f53524a009 --> 263e522e_1aa5_ebc3_e7d6_45ebc51671f7
  style 7527755b_e17c_736c_e973_19f53524a009 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import * as assert from 'node:assert/strict';
import { describe, it } from 'node:test';
import { pathToFileURL } from 'node:url';
import { resolveConfig } from 'vite';
import { compile } from '../../../dist/core/compile/index.js';
import { AggregateError } from '../../../dist/core/errors/index.js';

describe('astro/src/core/compile', () => {
	describe('Invalid CSS', () => {
		it('throws an aggregate error with the errors', async () => {
			let error;
			try {
				await compile({
					astroConfig: {
						root: pathToFileURL('/'),
						experimental: {},
					},
					viteConfig: await resolveConfig({ configFile: false }, 'serve'),
					filename: '/src/pages/index.astro',
					source: `
	---
	---
	<style lang="scss">
		article:global(:is(h1, h2, h3, h4, h5, h6):hover {
			color: purple;
		}
	</style>
	<style lang="scss">
		article:is(h1, h2, h3, h4, h5, h6:hover {
			color: purple;
		}
	</style>
	`,
				});
			} catch (err) {
				error = err;
			}

			assert.equal(error instanceof AggregateError, true);
			assert.equal(error.errors[0].message.includes('expected ")"'), true);
		});
	});
});

Dependencies

  • ../../../dist/core/compile/index.js
  • ../../../dist/core/errors/index.js
  • node:test
  • node:url
  • strict
  • vite

Frequently Asked Questions

What does invalid-css.test.js do?
invalid-css.test.js is a source file in the astro codebase, written in javascript. It belongs to the IntegrationAdapters domain.
What does invalid-css.test.js depend on?
invalid-css.test.js imports 6 module(s): ../../../dist/core/compile/index.js, ../../../dist/core/errors/index.js, node:test, node:url, strict, vite.
Where is invalid-css.test.js in the architecture?
invalid-css.test.js is located at packages/astro/test/units/compile/invalid-css.test.js (domain: IntegrationAdapters, directory: packages/astro/test/units/compile).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free