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

Add logo #29

Merged
merged 7 commits into from
May 22, 2020
Merged

Add logo #29

merged 7 commits into from
May 22, 2020

Conversation

amir-zad
Copy link
Collaborator

@amir-zad amir-zad commented May 21, 2020

Removed a mock file
Added assetsTransformer.js
Updated jest.config
Updated Bootcamp snapshot

jest.config.js Outdated
@@ -9,6 +9,11 @@ module.exports = {
transform: {
"^.+\\.(ts|tsx)$": "ts-jest",
},
moduleNameMapper: {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@dipeshwalia is it the only way to mock png files? should I do that any way?

Copy link
Collaborator

@dipeshwalia dipeshwalia May 21, 2020

Choose a reason for hiding this comment

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

Why we need this. even why we need jest.config.js ?, you can use assetsTransformer for jest

Package.json

"jest": {
"moduleNameMapper": {
      "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/src/utils/assetsTransformer.js",
      "\\.(css|less)$": "<rootDir>/src/utils/assetsTransformer.js"
    }
}

assetsTransformer:
jestjs/jest#2663 (comment)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why should me merge jest.config into package.json?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Because it's mis leading.

React scripts provide us basic jest configuration and not every jest configuration will be entertain by react scripts.

https://create-react-app.dev/docs/running-tests/#configuration

@@ -13,6 +13,20 @@ exports[`Bootcamp renders as expected 1`] = `
<div
className="MuiToolbar-root MuiToolbar-regular MuiToolbar-gutters"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see value with snapshot 🌊

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

why is that?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Testing = confidence in app.
Snapshot doesn't bring any.

Repository owner deleted a comment from codecov bot May 22, 2020
@codecov
Copy link

codecov bot commented May 22, 2020

Codecov Report

Merging #29 into master will increase coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #29      +/-   ##
==========================================
+ Coverage   97.21%   97.31%   +0.10%     
==========================================
  Files          23       24       +1     
  Lines         251      261      +10     
  Branches        8        8              
==========================================
+ Hits          244      254      +10     
  Misses          7        7              
Impacted Files Coverage Δ
src/utility/config/app.ts 100.00% <ø> (ø)
src/components/Logo.tsx 100.00% <100.00%> (ø)
src/components/bootcamp/BootcampHeader.tsx 100.00% <100.00%> (ø)
src/components/material/core.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 362d71b...74ac725. Read the comment docs.

className?: string | undefined
}

const getLogoPath = () => `${process.env.PUBLIC_URL}/static/images/logo.png`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You ok with this Boss @dipeshwalia ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

this is ok for now, but its good to avoid any env on ui.
Later on we can have configuration service to feed those value to Ui.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm gonna add an issue for that

@amir-zad amir-zad merged commit e92ca70 into master May 22, 2020
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