sass-tests.ts — vite Source File
Architecture documentation for sass-tests.ts, a typescript file in the vite codebase. 2 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 48f28f67_4a5c_e42b_f942_68d103bdd95b["sass-tests.ts"] a340ba46_b2b7_3048_3bb3_6907a74c8464["vitest"] 48f28f67_4a5c_e42b_f942_68d103bdd95b --> a340ba46_b2b7_3048_3bb3_6907a74c8464 d3fd5575_295b_d6be_24dd_62d277645dc9["~utils"] 48f28f67_4a5c_e42b_f942_68d103bdd95b --> d3fd5575_295b_d6be_24dd_62d277645dc9 c8d9e901_9260_5019_70d1_d0573d544a9c["tests.ts"] c8d9e901_9260_5019_70d1_d0573d544a9c --> 48f28f67_4a5c_e42b_f942_68d103bdd95b style 48f28f67_4a5c_e42b_f942_68d103bdd95b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { expect, test } from 'vitest'
import { editFile, getBg, getColor, isBuild, page, viteTestUrl } from '~utils'
export const sassTest = () => {
test('sass', async () => {
const imported = await page.$('.sass')
const atImport = await page.$('.sass-at-import')
const atImportAlias = await page.$('.sass-at-import-alias')
const atImportRelative = await page.$('.sass-at-import-relative')
const atImportReplacementAlias = await page.$(
'.sass-at-import-replacement-alias',
)
const urlStartsWithVariable = await page.$('.sass-url-starts-with-variable')
const urlStartsWithVariableInterpolation1 = await page.$(
'.sass-url-starts-with-interpolation1',
)
const urlStartsWithVariableInterpolation2 = await page.$(
'.sass-url-starts-with-interpolation2',
)
const urlStartsWithVariableConcat = await page.$(
'.sass-url-starts-with-variable-concat',
)
const urlStartsWithFunctionCall = await page.$(
'.sass-url-starts-with-function-call',
)
const partialImport = await page.$('.sass-partial')
expect(await getColor(imported)).toBe('orange')
expect(await getColor(atImport)).toBe('olive')
expect(await getBg(atImport)).toMatch(
isBuild ? /base64/ : '/nested/icon.png',
)
expect(await getColor(atImportAlias)).toBe('olive')
expect(await getBg(atImportAlias)).toMatch(
isBuild ? /base64/ : '/nested/icon.png',
)
expect(await getColor(atImportRelative)).toBe('olive')
expect(await getBg(atImportRelative)).toMatch(
isBuild ? /base64/ : '/nested/icon.png',
)
expect(await getColor(atImportReplacementAlias)).toBe('olive')
expect(await getBg(urlStartsWithVariable)).toMatch(
isBuild ? /ok-[-\w]+\.png/ : `${viteTestUrl}/ok.png`,
)
expect(await getBg(urlStartsWithVariableInterpolation1)).toMatch(
isBuild ? /ok-[-\w]+\.png/ : `${viteTestUrl}/ok.png`,
)
expect(await getBg(urlStartsWithVariableInterpolation2)).toMatch(
isBuild ? /ok-[-\w]+\.png/ : `${viteTestUrl}/ok.png`,
)
expect(await getBg(urlStartsWithVariableConcat)).toMatch(
isBuild ? /ok-[-\w]+\.png/ : `${viteTestUrl}/ok.png`,
)
expect(await getBg(urlStartsWithFunctionCall)).toMatch(
isBuild ? /ok-[-\w]+\.png/ : `${viteTestUrl}/ok.png`,
)
expect(await getColor(partialImport)).toBe('orchid')
expect(await getColor(await page.$('.sass-file-absolute'))).toBe('orange')
expect(await getColor(await page.$('.sass-dir-index'))).toBe('orange')
expect(await getColor(await page.$('.sass-root-relative'))).toBe('orange')
// ... (76 more lines)
Domain
Subdomains
Dependencies
- vitest
- ~utils
Imported By
Source
Frequently Asked Questions
What does sass-tests.ts do?
sass-tests.ts is a source file in the vite codebase, written in typescript. It belongs to the ViteCore domain, ConfigEngine subdomain.
What functions are defined in sass-tests.ts?
sass-tests.ts defines 3 function(s): sassModuleTests, sassOtherTests, sassTest.
What does sass-tests.ts depend on?
sass-tests.ts imports 2 module(s): vitest, ~utils.
What files import sass-tests.ts?
sass-tests.ts is imported by 1 file(s): tests.ts.
Where is sass-tests.ts in the architecture?
sass-tests.ts is located at playground/css/__tests__/sass-tests.ts (domain: ViteCore, subdomain: ConfigEngine, directory: playground/css/__tests__).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free