Skip to content
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

created unit tests for components under renderer #730

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dhuang612
Copy link

used ava and enzyme to write some unit tests

@dhuang612 dhuang612 mentioned this pull request Oct 3, 2019
@dhuang612
Copy link
Author

I'm not sure why this failed on the build step.
Could someone review the log and let me know?

@skllcrn
Copy link
Member

skllcrn commented Oct 3, 2019

Thank you @dhuang612! The build errors on yarn run dist, here is the complete log:

$ npm run build && electron-builder
npm WARN lifecycle The node binary used for scripts is /var/folders/1b/gl7yt7ds26vcyr1pkgld6l040000gn/T/yarn--1570132263077-0.9369727182887264/node but npm is using /usr/local/Cellar/node/12.6.0/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> [email protected] build /Users/distiller/project
> next build renderer && next export renderer

Creating an optimized production build ...

> Using external babel configuration
> Location: "/Users/distiller/project/.babelrc"
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade caniuse-lite browserslist`
> Build error occurred
Error: styled-jsx/css: if you are getting this error it means that your `css` tagged template literals were not transpiled.
    at notTranspiledError (/Users/distiller/project/renderer/.next/server/static/Vn1mUsGnz4XLgI_sNnGth/pages/cropper.js:5119:9)
    at css (/Users/distiller/project/renderer/.next/server/static/Vn1mUsGnz4XLgI_sNnGth/pages/cropper.js:5127:3)
    at Module.8zUD (/Users/distiller/project/renderer/.next/server/static/Vn1mUsGnz4XLgI_sNnGth/pages/cropper.js:936:30)
    at __webpack_require__ (/Users/distiller/project/renderer/.next/server/static/Vn1mUsGnz4XLgI_sNnGth/pages/cropper.js:23:31)
    at Object.3 (/Users/distiller/project/renderer/.next/server/static/Vn1mUsGnz4XLgI_sNnGth/pages/cropper.js:277:18)
    at __webpack_require__ (/Users/distiller/project/renderer/.next/server/static/Vn1mUsGnz4XLgI_sNnGth/pages/cropper.js:23:31)
    at /Users/distiller/project/renderer/.next/server/static/Vn1mUsGnz4XLgI_sNnGth/pages/cropper.js:91:18
    at Object.<anonymous> (/Users/distiller/project/renderer/.next/server/static/Vn1mUsGnz4XLgI_sNnGth/pages/cropper.js:94:10)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
 at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `next build renderer && next export renderer`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/distiller/.npm/_logs/2019-10-03T19_51_31_939Z-debug.log
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Exited with code 1

@dhuang612
Copy link
Author

@skllcrn
Okay, turns out I was missing a babel plugin for it to complete.
Added it
re-submitted and confirmed it passed.
I then squashed the extra commit and resubmitted.

let me know if anything else needs to be changed

@dhuang612
Copy link
Author

dhuang612 commented Oct 16, 2019

so for the unit tests, writing logic to test stuff like:

utils/format-time.js

for example?
@skllcrn

added in babel plugin for css in jsx

added in more tests
@skllcrn
Copy link
Member

skllcrn commented Nov 6, 2019

Thank you again @dhuang612, apologies for the delay, right now we're focused on our upcoming release and will have to put this on hold for the moment. We'll get back to you as soon as possible!

@dhuang612
Copy link
Author

@skllcrn np, thanks for the update!
Hope the upcoming release goes as smoothly as possible!

Base automatically changed from master to main January 23, 2021 13:40
@MALIK5656-SYS
Copy link

Hey sap y'all

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

Successfully merging this pull request may close these issues.

3 participants