index.test.ts — tailwindcss Source File
Architecture documentation for index.test.ts, a typescript file in the tailwindcss codebase. 6 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 8980fa32_c788_e52e_6c93_c76030922f8e["index.test.ts"] ec32f4ad_301d_f256_4d47_ab98a998662b["git.ts"] 8980fa32_c788_e52e_6c93_c76030922f8e --> ec32f4ad_301d_f256_4d47_ab98a998662b 4d4d6dde_2f48_a78c_bd07_da644bd1b7ef["isRepoDirty"] 8980fa32_c788_e52e_6c93_c76030922f8e --> 4d4d6dde_2f48_a78c_bd07_da644bd1b7ef 9ffd1dda_9675_c514_373d_0f4ab4648249["utils.ts"] 8980fa32_c788_e52e_6c93_c76030922f8e --> 9ffd1dda_9675_c514_373d_0f4ab4648249 b7531519_9055_fbfa_5f69_ebc8586b0422["candidate"] 8980fa32_c788_e52e_6c93_c76030922f8e --> b7531519_9055_fbfa_5f69_ebc8586b0422 f11e3be9_51f8_140b_68b0_f58ddd082595["test"] 8980fa32_c788_e52e_6c93_c76030922f8e --> f11e3be9_51f8_140b_68b0_f58ddd082595 2a7660a5_3e09_bd74_37f0_e4e54bc64ce5["node:path"] 8980fa32_c788_e52e_6c93_c76030922f8e --> 2a7660a5_3e09_bd74_37f0_e4e54bc64ce5 style 8980fa32_c788_e52e_6c93_c76030922f8e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import path from 'node:path'
import { isRepoDirty } from '../../packages/@tailwindcss-upgrade/src/utils/git'
import { candidate, css, html, js, json, test, ts, yaml } from '../utils'
test(
'error when no CSS file with @tailwind is used',
{
fs: {
'package.json': json`
{
"dependencies": {
"tailwindcss": "^3",
"@tailwindcss/upgrade": "workspace:^"
}
}
`,
'tailwind.config.js': js`
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./src/**/*.{html,js}'],
}
`,
'src/index.html': html`
<h1>🤠👋</h1>
<div class="!flex"></div>
`,
'src/fonts.css': css`/* Unrelated CSS file */`,
},
},
async ({ fs, exec, expect }) => {
let output = await exec('npx @tailwindcss/upgrade')
expect(output).toContain('Cannot find any CSS files that reference Tailwind CSS.')
// Files should not be modified
expect(await fs.dumpFiles('./src/**/*.{css,html}')).toMatchInlineSnapshot(`
"
--- ./src/index.html ---
<h1>🤠👋</h1>
<div class="!flex"></div>
--- ./src/fonts.css ---
/* Unrelated CSS file */
"
`)
},
)
test(
`upgrades a v3 project to v4`,
{
fs: {
'package.json': json`
{
"dependencies": {
"tailwindcss": "^3",
"@tailwindcss/upgrade": "workspace:^"
},
"devDependencies": {
"@tailwindcss/cli": "workspace:^"
}
// ... (3148 more lines)
Domain
Subdomains
Functions
Dependencies
Source
Frequently Asked Questions
What does index.test.ts do?
index.test.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the OxideEngine domain, Scanner subdomain.
What functions are defined in index.test.ts?
index.test.ts defines 1 function(s): withBOM.
What does index.test.ts depend on?
index.test.ts imports 6 module(s): candidate, git.ts, isRepoDirty, node:path, test, utils.ts.
Where is index.test.ts in the architecture?
index.test.ts is located at integrations/upgrade/index.test.ts (domain: OxideEngine, subdomain: Scanner, directory: integrations/upgrade).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free