Home / File/ smoke.test.js — react Source File

smoke.test.js — react Source File

Architecture documentation for smoke.test.js, a javascript file in the react codebase. 1 imports, 0 dependents.

File javascript 1 imports

Entity Profile

Dependency Diagram

graph LR
  8204ff11_bd7d_4c16_03ea_1e6700a12a6f["smoke.test.js"]
  e8a3e16f_a05b_70e2_f55c_9d0b69ce9004["test"]
  8204ff11_bd7d_4c16_03ea_1e6700a12a6f --> e8a3e16f_a05b_70e2_f55c_9d0b69ce9004
  style 8204ff11_bd7d_4c16_03ea_1e6700a12a6f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import {test, expect} from '@playwright/test';

test('smoke test', async ({page}) => {
  const consoleErrors = [];
  page.on('console', msg => {
    const type = msg.type();
    if (type === 'warn' || type === 'error') {
      consoleErrors.push({type: type, text: msg.text()});
    }
  });
  const pageErrors = [];
  page.on('pageerror', error => {
    pageErrors.push(error.stack);
  });
  await page.goto('/');
  await expect(page.getByTestId('promise-as-a-child-test')).toHaveText(
    'Promise as a child hydrates without errors: deferred text'
  );
  await expect(page.getByTestId('prerendered')).not.toBeAttached();

  await expect(consoleErrors).toEqual([]);
  await expect(pageErrors).toEqual([]);

  await page.goto('/prerender');
  await expect(page.getByTestId('prerendered')).toBeAttached();

  await expect(consoleErrors).toEqual([]);
  await expect(pageErrors).toEqual([]);
});

Dependencies

  • test

Frequently Asked Questions

What does smoke.test.js do?
smoke.test.js is a source file in the react codebase, written in javascript.
What does smoke.test.js depend on?
smoke.test.js imports 1 module(s): test.
Where is smoke.test.js in the architecture?
smoke.test.js is located at fixtures/flight/__tests__/__e2e__/smoke.test.js (directory: fixtures/flight/__tests__/__e2e__).

Analyze Your Own Codebase

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

Try Supermodel Free