PHP Classes

File: tests/js/helpers.js

Recommend this page to a friend!
  Packages of Boss Ibrahim Mussa   Caelrik   tests/js/helpers.js   Download  
File: tests/js/helpers.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Caelrik
Build Web user interface from PHP components
Author: By
Last change:
Date: 8 days ago
Size: 282 bytes
 

 

Contents

Class file image Download
import { readFileSync } from 'node:fs'; import { join } from 'node:path'; export function loadFixture(name) { document.body.innerHTML = `<main>${readFileSync(join(__dirname, 'fixtures', `${name}.html`), 'utf8')}</main>`; return document.body.querySelector('[data-caelrik]'); }