This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
generated from pagopa/io-template-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
[#167163350] front end setup #1
Merged
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4497aab
added libraries to package.json
d-al-ibm f4da088
first commit for project structure added packages needed for react, c…
d-al-ibm a08dc0f
moved App.test to __test__ folder
d-al-ibm c5f5ed5
fixed build script and jest version for testing + added react-test-re…
d-al-ibm fc13b70
fixed setup for testing with jest and enzyme
d-al-ibm 9e4f64e
added story link to keep track of temp fix for react
d-al-ibm d985984
fixed package.json to include latest versions of packages
d-al-ibm d191eda
missin setupEnzyme and yarn.lock
d-al-ibm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module.exports = { | ||
"roots": [ | ||
"<rootDir>/src" | ||
], | ||
"transform": { | ||
"^.+\\.tsx?$": "ts-jest" | ||
}, | ||
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$", | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"tsx", | ||
"js", | ||
"jsx", | ||
"json", | ||
"node" | ||
], | ||
"testEnvironment": "node", | ||
|
||
// Setup Enzyme | ||
"snapshotSerializers": ["enzyme-to-json/serializer"], | ||
"setupTestFrameworkScriptFile": "<rootDir>/src/setupEnzyme.ts", | ||
"moduleNameMapper": { | ||
"^.+\\.(css|less|scss)$": "babel-jest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,23 +14,29 @@ | |
"lint": "tslint --project ." | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^24.0.13", | ||
"@types/enzyme": "^3.1.12", | ||
"@types/enzyme-adapter-react-16": "^1.0.2", | ||
"@types/jest": "^23.3.1", | ||
"@types/node": "10.14.1", | ||
"@types/react": "16.8.23", | ||
"@types/react-dom": "16.8.4", | ||
"@types/react-test-renderer": "^16.8.2", | ||
"@types/reactstrap": "^8.0.1", | ||
"danger": "^8.0.0", | ||
"danger-plugin-digitalcitizenship": "*", | ||
"enzyme": "^3.3.0", | ||
"enzyme-adapter-react-16": "^1.1.1", | ||
"enzyme-to-json": "^3.3.4", | ||
"jest": "^23.4.2", | ||
"italia-tslint-rules": "*", | ||
"jest": "24.7.1", | ||
"parcel-bundler": "^1.12.3", | ||
"prettier": "^1.12.1", | ||
"react-test-renderer": "^16.8.6", | ||
"rimraf": "^2.6.2", | ||
"sass": "^1.22.4", | ||
"ts-jest": "^24.0.2", | ||
"ts-jest": "23.0.1", | ||
"tslint": "^5.1.0", | ||
"typescript": "3.5.3" | ||
"typescript": "^3.0.1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why the downgrade? |
||
}, | ||
"dependencies": { | ||
"@coreui/coreui": "^2.1.12", | ||
|
@@ -46,7 +52,6 @@ | |
"react-dom": "^16.8.6", | ||
"react-router-config": "^5.0.1", | ||
"react-router-dom": "^5.0.1", | ||
"react-scripts": "3.0.1", | ||
"reactstrap": "^8.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import { shallow } from "enzyme"; | ||
import * as React from "react"; | ||
import * as ReactDOM from "react-dom"; | ||
import { App } from "../App"; | ||
|
||
it("renders without crashing", () => { | ||
const div = document.createElement("div"); | ||
ReactDOM.render(<App />, div); | ||
ReactDOM.unmountComponentAtNode(div); | ||
it("mounts without crashing", () => { | ||
const wrapper = shallow(<App />); | ||
wrapper.unmount(); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { configure } from "enzyme"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is used only for testing, it shouldn't be under |
||
import EnzymeAdapter from "enzyme-adapter-react-16"; | ||
|
||
configure({ adapter: new EnzymeAdapter() }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the downgrade?