Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

[#167163350] front end setup #1

Merged
merged 8 commits into from
Jul 23, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed package.json to include latest versions of packages
fixed tsconfig and jest.config for problems with tests
moved setupEnzyme to root folder
create styleMocks to mock style files for test
removed index.ts that created problems with tests
  • Loading branch information
d-al-ibm committed Jul 23, 2019
commit d9859845adec96905f8273c5b3797577c4105126
46 changes: 23 additions & 23 deletions jest.config.js
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,25 +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",
"roots": [
"<rootDir>/src"
],
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
],
"testEnvironment": "jsdom",

// Setup Enzyme
"snapshotSerializers": ["enzyme-to-json/serializer"],
"setupTestFrameworkScriptFile": "<rootDir>/src/setupEnzyme.ts",
"moduleNameMapper": {
"^.+\\.(css|less|scss)$": "babel-jest"
}
}
// Setup Enzyme
"snapshotSerializers": ["enzyme-to-json/serializer"],
"setupFilesAfterEnv": ["<rootDir>/setupEnzyme.ts"],
"moduleNameMapper": {
".+\\.(css|scss)$": "<rootDir>/styleMock.ts"
},
};
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,28 @@
"devDependencies": {
"@types/enzyme": "^3.1.12",
"@types/enzyme-adapter-react-16": "^1.0.2",
"@types/jest": "^23.3.1",
"@types/jest": "^24.0.13",
"@types/node": "10.14.1",
"@types/react": "16.8.23",
"@types/react-dom": "16.8.4",
"@types/react-router-dom": "^4.3.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.8.0",
"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": "23.0.1",
"ts-jest": "^24.0.2",
"tslint": "^5.1.0",
"typescript": "^3.0.1"
"typescript": "^3.5.0",
"sass": "^1.22.4"
},
"dependencies": {
"@coreui/coreui": "^2.1.12",
Expand Down
2 changes: 1 addition & 1 deletion src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
// Bootstrap italia
@import '../node_modules/bootstrap-italia/dist/css/bootstrap-italia.min.css';
// Import Main styles for this applicationsc
@import 'scss/style.scss';
@import './scss/style';
3 changes: 0 additions & 3 deletions src/index.ts

This file was deleted.

1 change: 1 addition & 0 deletions styleMock.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
18 changes: 3 additions & 15 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,16 @@
"target": "es2017",
"rootDir": "src",
"outDir": "dist",
"module": "esnext",
"module": "commonjs",
"moduleResolution": "node",
"strict": true,
"noImplicitAny": true,
"declaration": true,
"sourceMap": true,
"jsx": "react",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true
"jsx": "react"
},
"lib": [],
"lib": ["dom"],
"include": [
"src/**/*"
],
Expand Down
Loading