BLUE
PHP 7.4.33
Path:
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/metro/src/ModuleGraph
Run
Logout
Edit File
Size: 1.71 KB
Close
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/metro/src/ModuleGraph/test-helpers.js
Text
Base64
"use strict"; const generate = require("@babel/generator").default; const { toMatchSnapshot } = require("jest-snapshot"); const generateOptions = { concise: true, sourceType: "module", }; const codeFromAst = (ast) => generate(ast, generateOptions).code; const comparableCode = (code) => code.trim().replace(/\s+/g, " "); function toEqualComparableCode(received, expected) { const comparableExpected = comparableCode(expected); const pass = received === comparableExpected; const options = { isNot: this.isNot, promise: this.promise, }; const message = pass ? () => this.utils.matcherHint( "toEqualComparableCode", undefined, undefined, options ) + "\n\n" + `Expected: not ${this.utils.printExpected(comparableExpected)}\n` + `Received: ${this.utils.printReceived(received)}` : () => { const diffString = this.utils.printDiffOrStringify( comparableExpected, received, "expected", "received", this.expand ); return ( this.utils.matcherHint( "toEqualComparableCode", undefined, undefined, options ) + "\n\n" + diffString ); }; return { actual: received, message, pass, }; } const ANSI_PATTERN = /\x1b\[[0-9;]*m/g; function trimANSICodes(input) { return input.replace(ANSI_PATTERN, ""); } function toMatchCodeFrameSnapshot(received) { return toMatchSnapshot.call( this, trimANSICodes(received), "toMatchCodeFrameSnapshot" ); } module.exports = { codeFromAst, comparableCode, toEqualComparableCode, toMatchCodeFrameSnapshot, };
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 1
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
worker
DIR
-
drwxr-xr-x
2025-03-28 11:04:33
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
test-helpers.js
1.71 KB
lrw-r--r--
2025-03-28 11:04:33
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).