Home / File/ wasm.spec.ts — vite Source File

wasm.spec.ts — vite Source File

Architecture documentation for wasm.spec.ts, a typescript file in the vite codebase. 2 imports, 0 dependents.

File typescript 2 imports

Entity Profile

Dependency Diagram

graph LR
  4535e8c3_3645_91a4_f133_e6d9d27e50e8["wasm.spec.ts"]
  a340ba46_b2b7_3048_3bb3_6907a74c8464["vitest"]
  4535e8c3_3645_91a4_f133_e6d9d27e50e8 --> a340ba46_b2b7_3048_3bb3_6907a74c8464
  d3fd5575_295b_d6be_24dd_62d277645dc9["~utils"]
  4535e8c3_3645_91a4_f133_e6d9d27e50e8 --> d3fd5575_295b_d6be_24dd_62d277645dc9
  style 4535e8c3_3645_91a4_f133_e6d9d27e50e8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { expect, test } from 'vitest'
import { isBuild, page } from '~utils'

test('should work when inlined', async () => {
  await page.click('.inline-wasm .run')
  await expect
    .poll(() => page.textContent('.inline-wasm .result'))
    .toMatch('42')
})

test('should work when output', async () => {
  await page.click('.output-wasm .run')
  await expect
    .poll(() => page.textContent('.output-wasm .result'))
    .toMatch('24')
})

test('init function returns WebAssembly.Instance', async () => {
  await page.click('.init-returns-instance .run')
  await expect
    .poll(() => page.textContent('.init-returns-instance .result'))
    .toMatch('true')
})

test('?url', async () => {
  expect(await page.textContent('.url')).toMatch(
    isBuild ? 'data:application/wasm' : '/light.wasm',
  )
})

test('should work when wasm in worker', async () => {
  await expect.poll(() => page.textContent('.worker-wasm .result')).toMatch('3')
})

Dependencies

  • vitest
  • ~utils

Frequently Asked Questions

What does wasm.spec.ts do?
wasm.spec.ts is a source file in the vite codebase, written in typescript.
What does wasm.spec.ts depend on?
wasm.spec.ts imports 2 module(s): vitest, ~utils.
Where is wasm.spec.ts in the architecture?
wasm.spec.ts is located at playground/wasm/__tests__/wasm.spec.ts (directory: playground/wasm/__tests__).

Analyze Your Own Codebase

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

Try Supermodel Free