Home / File/ format-ns.test.ts — tailwindcss Source File

format-ns.test.ts — tailwindcss Source File

Architecture documentation for format-ns.test.ts, a typescript file in the tailwindcss codebase. 3 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  8ad5b760_bd6b_6cfb_8943_0e4fc3a60001["format-ns.test.ts"]
  563df76b_3493_d61f_154e_4c7cc1eb0d26["format-ns.ts"]
  8ad5b760_bd6b_6cfb_8943_0e4fc3a60001 --> 563df76b_3493_d61f_154e_4c7cc1eb0d26
  a3646bb8_6d98_7507_9794_aaae4a53752a["formatNanoseconds"]
  8ad5b760_bd6b_6cfb_8943_0e4fc3a60001 --> a3646bb8_6d98_7507_9794_aaae4a53752a
  f1e05e5f_c1b2_a3f5_b2e8_3317b9243ac3["vitest"]
  8ad5b760_bd6b_6cfb_8943_0e4fc3a60001 --> f1e05e5f_c1b2_a3f5_b2e8_3317b9243ac3
  style 8ad5b760_bd6b_6cfb_8943_0e4fc3a60001 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { expect, it } from 'vitest'
import { formatNanoseconds } from './format-ns'

it.each([
  [0, '0ns'],
  [1, '1ns'],
  [999, '999ns'],
  [1000, '1µs'],
  [1001, '1µs'],
  [999999, '999µs'],
  [1000000, '1ms'],
  [1000001, '1ms'],
  [999999999, '999ms'],
  [1000000000, '1s'],
  [1000000001, '1s'],
  [59999999999, '59s'],
  [60000000000, '1m'],
  [60000000001, '1m'],
  [3599999999999n, '59m'],
  [3600000000000n, '1h'],
  [3600000000001n, '1h'],
  [86399999999999n, '23h'],
  [86400000000000n, '1d'],
  [86400000000001n, '1d'],
  [8640000000000000n, '100d'],
])('should format %s nanoseconds as %s', (ns, expected) => {
  expect(formatNanoseconds(ns)).toBe(expected)
})

Dependencies

Frequently Asked Questions

What does format-ns.test.ts do?
format-ns.test.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the CommandLineInterface domain.
What does format-ns.test.ts depend on?
format-ns.test.ts imports 3 module(s): format-ns.ts, formatNanoseconds, vitest.
Where is format-ns.test.ts in the architecture?
format-ns.test.ts is located at packages/@tailwindcss-upgrade/src/utils/format-ns.test.ts (domain: CommandLineInterface, directory: packages/@tailwindcss-upgrade/src/utils).

Analyze Your Own Codebase

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

Try Supermodel Free