Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-103430

js-unit-private failure in DocumentLibraryOpener.es.js

    Details

    • Type: Regression Bug
    • Status: Closed
    • Resolution: No Longer Reproducible
    • Affects Version/s: Master
    • Fix Version/s: Master
    • Component/s: DM, Frontend Infrastructure
    • Labels:
      None

      Description

      [exec] > Task :private:apps:document-library-opener:document-library-opener-onedrive-web:packageRunTest
           [exec] FAIL test/js/DocumentLibraryOpener.es.js
           [exec]   ??? Test suite failed to run
           [exec] 
           [exec]     Jest encountered an unexpected token
           [exec] 
           [exec]     This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
           [exec] 
           [exec]     By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
           [exec] 
           [exec]     Here's what you can do:
           [exec]      ??? To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
           [exec]      ??? If you need a custom transformation specify a "transform" option in your config.
           [exec]      ??? If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
           [exec] 
           [exec]     You'll find more details and examples of these config options in the docs:
           [exec]     https://jestjs.io/docs/en/configuration.html
           [exec] 
           [exec]     Details:
           [exec] 
           [exec]     SyntaxError: /opt/dev/projects/github/liferay-portal/modules/apps/frontend-js/frontend-js-web/src/main/resources/META-INF/resources/liferay/toast/commands/OpenToast.es.js: Unexpected token (42:2)
           [exec] 
           [exec]       40 | const Toast = ({displayType, message, onClose, title, toastProps, variant}) => {
           [exec]       41 | 	return (
           [exec]     > 42 | 		<ClayAlert.ToastContainer>
           [exec]          | 		^
           [exec]       43 | 			<ClayAlert
           [exec]       44 | 				autoClose={TOAST_AUTO_CLOSE_INTERVAL}
           [exec]       45 | 				displayType={displayType}
           [exec] 
           [exec]       at Parser.raise (../../../node_modules/@babel/parser/lib/index.js:6325:17)
           [exec]       at Parser.unexpected (../../../node_modules/@babel/parser/lib/index.js:7642:16)
           [exec]       at Parser.parseExprAtom (../../../node_modules/@babel/parser/lib/index.js:8841:20)
           [exec]       at Parser.parseExprSubscripts (../../../node_modules/@babel/parser/lib/index.js:8412:23)
           [exec]       at Parser.parseMaybeUnary (../../../node_modules/@babel/parser/lib/index.js:8392:21)
           [exec]       at Parser.parseExprOps (../../../node_modules/@babel/parser/lib/index.js:8267:23)
           [exec]       at Parser.parseMaybeConditional (../../../node_modules/@babel/parser/lib/index.js:8240:23)
           [exec]       at Parser.parseMaybeAssign (../../../node_modules/@babel/parser/lib/index.js:8187:21)
           [exec]       at Parser.parseParenAndDistinguishExpression (../../../node_modules/@babel/parser/lib/index.js:8978:28)
           [exec]       at Parser.parseExprAtom (../../../node_modules/@babel/parser/lib/index.js:8762:21)
      

      Full Console Log:
      https://testray.liferay.com/reports/production/logs/test-1-5/1571544097649/test-portal-testsuite-upstream(master)/127/js-unit-private-jdk8/0/jenkins-console.txt.gz

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                joyce.wang Joyce Wang
                Reporter:
                joyce.wang Joyce Wang
                Participants of an Issue:
                Recent user:
                Joyce Wang
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 weeks, 5 days ago

                  Packages

                  Version Package
                  Master