test.ts — svelte Source File
Architecture documentation for test.ts, a typescript file in the svelte codebase. 12 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 8e711bf9_bf97_b655_8376_8fca789308e2["test.ts"] 2b655554_f9cf_daf9_c56b_a99baafbe0fd["suite.ts"] 8e711bf9_bf97_b655_8376_8fca789308e2 --> 2b655554_f9cf_daf9_c56b_a99baafbe0fd 1354ddff_1efb_c4e4_5cd0_7b354ba0a9b4["suite"] 8e711bf9_bf97_b655_8376_8fca789308e2 --> 1354ddff_1efb_c4e4_5cd0_7b354ba0a9b4 9d3b8d45_a7dc_62e7_8c67_08d6de8f73fc["suite_with_variants"] 8e711bf9_bf97_b655_8376_8fca789308e2 --> 9d3b8d45_a7dc_62e7_8c67_08d6de8f73fc e97e8c41_1b06_4e9a_29f3_64dbb37dee3c["helpers.js"] 8e711bf9_bf97_b655_8376_8fca789308e2 --> e97e8c41_1b06_4e9a_29f3_64dbb37dee3c 0cc30cef_146b_ae81_29f3_171594189af4["write"] 8e711bf9_bf97_b655_8376_8fca789308e2 --> 0cc30cef_146b_ae81_29f3_171594189af4 62b6f504_c99b_3d70_e3f1_9d11a883b792["test"] 8e711bf9_bf97_b655_8376_8fca789308e2 --> 62b6f504_c99b_3d70_e3f1_9d11a883b792 22af63cc_2849_c38b_cfe8_92ba65a697b5["esbuild"] 8e711bf9_bf97_b655_8376_8fca789308e2 --> 22af63cc_2849_c38b_cfe8_92ba65a697b5 f596e027_a951_36c9_7695_83acc4f0d6b9["node:fs"] 8e711bf9_bf97_b655_8376_8fca789308e2 --> f596e027_a951_36c9_7695_83acc4f0d6b9 f8929fbd_6327_2bb8_f43b_31a3db2e4d74["node:path"] 8e711bf9_bf97_b655_8376_8fca789308e2 --> f8929fbd_6327_2bb8_f43b_31a3db2e4d74 a8d49317_f479_a216_78e7_48c9e32499d5["compiler"] 8e711bf9_bf97_b655_8376_8fca789308e2 --> a8d49317_f479_a216_78e7_48c9e32499d5 b63ddb92_634c_990b_eb1b_0bad8a4d434e["vitest"] 8e711bf9_bf97_b655_8376_8fca789308e2 --> b63ddb92_634c_990b_eb1b_0bad8a4d434e c696582a_9f3f_d301_2824_cb3de66aa770["#compiler"] 8e711bf9_bf97_b655_8376_8fca789308e2 --> c696582a_9f3f_d301_2824_cb3de66aa770 style 8e711bf9_bf97_b655_8376_8fca789308e2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { chromium } from '@playwright/test';
import { build } from 'esbuild';
import * as fs from 'node:fs';
import * as path from 'node:path';
import { compile } from 'svelte/compiler';
import { afterAll, assert, beforeAll, describe } from 'vitest';
import { suite, suite_with_variants } from '../suite';
import { write, fragments } from '../helpers';
import type { Warning } from '#compiler';
const assert_file = path.resolve(__dirname, 'assert.js');
let browser: import('@playwright/test').Browser;
beforeAll(async () => {
browser = await chromium.launch();
}, 20000);
afterAll(async () => {
if (browser) await browser.close();
});
const { run: run_browser_tests } = suite_with_variants<
ReturnType<typeof import('./assert').test>,
'dom' | 'hydrate',
void
>(
['dom', 'hydrate'],
(variant, config) => {
if (variant === 'hydrate') {
if (config.mode && !config.mode.includes('hydrate')) return 'no-test';
if (config.skip_mode?.includes('hydrate')) return true;
}
return false;
},
() => {},
async (config, test_dir, variant) => {
await run_test(test_dir, config, variant === 'hydrate');
}
);
describe.concurrent(
'runtime-browser',
() => run_browser_tests(__dirname),
// Browser tests are brittle and slow on CI
{ timeout: 20000, retry: process.env.CI ? 1 : 0 }
);
const { run: run_ce_tests } = suite<ReturnType<typeof import('./assert').test>>(
async (config, test_dir) => {
await run_test(test_dir, config, false);
}
);
describe.concurrent(
'custom-elements',
() => run_ce_tests(__dirname, 'custom-elements-samples'),
// Browser tests are brittle and slow on CI
{ timeout: 20000, retry: process.env.CI ? 1 : 0 }
// ... (176 more lines)
Domain
Subdomains
Dependencies
- #compiler
- compiler
- esbuild
- helpers.js
- node:fs
- node:path
- suite
- suite.ts
- suite_with_variants
- test
- vitest
- write
Source
Frequently Asked Questions
What does test.ts do?
test.ts is a source file in the svelte codebase, written in typescript. It belongs to the BuildSystem domain, QualityControl subdomain.
What functions are defined in test.ts?
test.ts defines 2 function(s): pretty_print_browser_assertion, run_test.
What does test.ts depend on?
test.ts imports 12 module(s): #compiler, compiler, esbuild, helpers.js, node:fs, node:path, suite, suite.ts, and 4 more.
Where is test.ts in the architecture?
test.ts is located at packages/svelte/tests/runtime-browser/test.ts (domain: BuildSystem, subdomain: QualityControl, directory: packages/svelte/tests/runtime-browser).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free