8000 STRWEB-32 Alias browser mocha by JohnC-80 · Pull Request #43 · folio-org/stripes-webpack · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

STRWEB-32 Alias browser mocha #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 21, 2021
Merged

STRWEB-32 Alias browser mocha #43

merged 3 commits into from
Dec 21, 2021

Conversation

JohnC-80
Copy link
Contributor
@JohnC-80 JohnC-80 commented Dec 21, 2021

Reduces a bit of the noise when spinning up test suites due to mocha's node-functional version being its primary export....

This creates an alias for the 'mocha' import to its browser version (polyfills some of the node process API)
based on the final comment here: mochajs/mocha#2448 (comment)

This reduces the console noise in the testing terminal, removing one or more occurrences of:

 {
    moduleIdentifier: '/home/runner/work/stripes-components/stripes-components/node_modules/mocha/lib/mocha.js',
    moduleName: './node_modules/mocha/lib/mocha.js',
    loc: '342:19-40',
    message: 'Critical dependency: the request of a dependency is an expression',
    moduleId: './node_modules/mocha/lib/mocha.js',
    moduleTrace: [ [Object], [Object], [Object], [Object] ],
    details: '    at CommonJsRequireContextDependency.getWarnings (/home/runner/work/stripes-components/stripes-components/node_modules/webpack/lib/dependencies/ContextDependency.js:91:18)\n' +
      '    at Compilation.reportDependencyErrorsAndWarnings (/home/runner/work/stripes-components/stripes-components/node_modules/webpack/lib/Compilation.js:3127:24)\n' +
      '    at /home/runner/work/stripes-components/stripes-components/node_modules/webpack/lib/Compilation.js:2724:28\n' +
      '    at eval (eval at create (/home/runner/work/stripes-components/stripes-components/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)\n' +
      '    at /home/runner/work/stripes-components/stripes-components/node_modules/webpack/lib/FlagDependencyExportsPlugin.js:385:11\n' +
      '    at /home/runner/work/stripes-components/stripes-components/node_modules/neo-async/async.js:2830:7\n' +
      '    at Object.each (/home/runner/work/stripes-components/stripes-components/node_modules/neo-async/async.js:2850:39)\n' +
      '    at /home/runner/work/stripes-components/stripes-components/node_modules/webpack/lib/FlagDependencyExportsPlugin.js:361:18\n' +
      '    at /home/runner/work/stripes-components/stripes-components/node_modules/neo-async/async.js:2830:7\n' +
      '    at done (/home/runner/work/stripes-components/stripes-components/node_modules/neo-async/async.js:2865:11)',
    stack: 'ModuleDependencyWarning: Critical dependency: the request of a dependency is an expression\n' +
      '    at Compilation.reportDependencyErrorsAndWarnings (/home/runner/work/stripes-components/stripes-components/node_modules/webpack/lib/Compilation.js:3132:23)\n' +
      '    at /home/runner/work/stripes-components/stripes-components/node_modules/webpack/lib/Compilation.js:2724:28\n' +
      '    at eval (eval at create (/home/runner/work/stripes-components/stripes-components/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)\n' +
      '    at /home/runner/work/stripes-components/stripes-components/node_modules/webpack/lib/FlagDependencyExportsPlugin.js:385:11\n' +
      '    at /home/runner/work/stripes-components/stripes-components/node_modules/neo-async/async.js:2830:7\n' +
      '    at Object.each (/home/runner/work/stripes-components/stripes-components/node_modules/neo-async/async.js:2850:39)\n' +
      '    at /home/runner/work/stripes-components/stripes-components/node_modules/webpack/lib/FlagDependencyExportsPlugin.js:361:18\n' +
      '    at /home/runner/work/stripes-components/stripes-components/node_modules/neo-async/async.js:2830:7\n' +
      '    at done (/home/runner/work/stripes-components/stripes-components/node_modules/neo-async/async.js:2865:11)\n' +
      '    at /home/runner/work/stripes-components/stripes-components/node_modules/neo-async/async.js:2818:7'
  } ....

Refs STRWEB-32

@JohnC-80 JohnC-80 requested a review from mkuklis December 21, 2021 19:57
@github-actions
Copy link
github-actions bot commented Dec 21, 2021

Jest Unit Test Statistics

0 files  ±0  0 suites  ±0   0s ⏱️ ±0s
0 tests ±0  0 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 93fb847. ± Comparison against base commit 3773a73.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
github-actions bot commented Dec 21, 2021

BigTest Unit Test Statistics

  1 files  ±0  39 suites  ±0   0s ⏱️ ±0s
74 tests ±0  74 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 93fb847. ± Comparison against base commit 3773a73.

♻️ This comment has been updated with latest results.

Copy link
Contributor
@mkuklis mkuklis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done @JohnC-80!

@JohnC-80 JohnC-80 merged commit 730ef33 into master Dec 21, 2021
@zburke zburke changed the title Alias browser mocha STRWEB-32 Alias browser mocha Dec 22, 2021
"version": "3.0.0",
"version": "3.0.2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was the version bumped here? Since we haven't even formally released 3.0.0, this should not have changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0