PHP Classes

File: jest.config.cjs

Recommend this page to a friend!
  Packages of Boss Ibrahim Mussa   Caelrik   jest.config.cjs   Download  
File: jest.config.cjs
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: 1,324 bytes
 

 

Contents

Class file image Download
module.exports = { testEnvironment: 'jsdom', roots: ['<rootDir>/tests/js'], setupFiles: ['<rootDir>/tests/js/setup.js'], transform: { '\\.m?js$': 'babel-jest', }, // These packages ship ES modules only for the browser; transform them too. transformIgnorePatterns: ['/node_modules/(?!(preact|@fullcalendar|quill|parchment|marked)/)'], moduleNameMapper: { // Stylesheets imported by Quill and FilePond modules are irrelevant in jsdom. '\\.css$': '<rootDir>/tests/js/style-stub.js', // Vite's ?url imports (the PDF.js worker) are a file name in the bundle. '\\?url$': '<rootDir>/tests/js/style-stub.js', // Quill imports lodash-es (644 ES module files that every worker would transform); // the CommonJS build has the same API and needs no transform. Tests only. '^lodash-es$': 'lodash', // The bundle imports the ES module builds of the DataTables Buttons; Jest loads their // CommonJS builds, which read window.DataTable (set in setup.js). '^(datatables\\.net-buttons/js/.*)\\.mjs$': '$1.js', }, // With a cold cache (always the case in CI) the first test that imports Quill or // FilePond spends several seconds transforming them, beyond Jest's 5 s default. testTimeout: 30000, collectCoverageFrom: ['resources/js/**/*.js', '!resources/js/index.js'], };