Commit aa4598bf by Johannes Edmeier

fix jest setup

parent f73da8ec
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
"moment": "^2.21.0", "moment": "^2.21.0",
"moment-shortformat": "^2.1.0", "moment-shortformat": "^2.1.0",
"pretty-bytes": "^4.0.2", "pretty-bytes": "^4.0.2",
"rxjs": "^5.5.6", "rxjs": "^5.5.7",
"vue": "^2.5.15", "vue": "^2.5.16",
"vue-clickaway": "^2.1.0", "vue-clickaway": "^2.1.0",
"vue-router": "^3.0.1", "vue-router": "^3.0.1",
"yamljs": "^0.3.0" "yamljs": "^0.3.0"
...@@ -63,17 +63,17 @@ ...@@ -63,17 +63,17 @@
"html-webpack-plugin": "^2.30.0", "html-webpack-plugin": "^2.30.0",
"identity-obj-proxy": "^3.0.0", "identity-obj-proxy": "^3.0.0",
"jest": "^22.4.2", "jest": "^22.4.2",
"jest-vue": "^0.8.2",
"lodash-webpack-plugin": "^0.11.4", "lodash-webpack-plugin": "^0.11.4",
"node-sass": "^4.7.2", "node-sass": "^4.8.2",
"optimize-css-assets-webpack-plugin": "^3.2.0", "optimize-css-assets-webpack-plugin": "^3.2.0",
"postcss-loader": "^2.1.1", "postcss-loader": "^2.1.1",
"sass-loader": "^6.0.7", "sass-loader": "^6.0.7",
"style-loader": "^0.20.3", "style-loader": "^0.20.3",
"url-loader": "^0.6.2", "url-loader": "^0.6.2",
"vue-jest": "^2.1.1",
"vue-loader": "^14.2.1", "vue-loader": "^14.2.1",
"vue-svg-loader": "^0.5.0", "vue-svg-loader": "^0.5.0",
"vue-template-compiler": "^2.5.15", "vue-template-compiler": "^2.5.16",
"webpack": "^3.11.0", "webpack": "^3.11.0",
"webpack-bundle-analyzer": "^2.11.1" "webpack-bundle-analyzer": "^2.11.1"
}, },
...@@ -89,12 +89,11 @@ ...@@ -89,12 +89,11 @@
"vue" "vue"
], ],
"moduleNameMapper": { "moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/src/test/frontend/__mocks__/file-mock.js", "\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/src/test/frontend/__mocks__/file-mock.js"
"\\.(css|scss)$": "<rootDir>/__mocks__/file-mocks.js"
}, },
"transform": { "transform": {
"\\.js$": "babel-jest", "\\.js$": "babel-jest",
"\\.vue$": "jest-vue", "\\.vue$": "vue-jest",
"\\.svg$": "<rootDir>/src/test/frontend/__mocks__/vue-mock-component.js" "\\.svg$": "<rootDir>/src/test/frontend/__mocks__/vue-mock-component.js"
}, },
"transformIgnorePatterns": [ "transformIgnorePatterns": [
......
...@@ -4,9 +4,7 @@ exports[`application-status should match the snapshot with custom status 1`] = ` ...@@ -4,9 +4,7 @@ exports[`application-status should match the snapshot with custom status 1`] = `
<div <div
class="application-status" class="application-status"
> >
<font-awesome-icon <!---->
class="application-status__icon application-status__icon--?"
/>
<!----> <!---->
</div> </div>
...@@ -16,10 +14,7 @@ exports[`application-status should match the snapshot with status DOWN 1`] = ` ...@@ -16,10 +14,7 @@ exports[`application-status should match the snapshot with status DOWN 1`] = `
<div <div
class="application-status" class="application-status"
> >
<font-awesome-icon <!---->
class="application-status__icon application-status__icon--DOWN"
icon="times-circle"
/>
<!----> <!---->
</div> </div>
...@@ -29,10 +24,7 @@ exports[`application-status should match the snapshot with status OFFLINE 1`] = ...@@ -29,10 +24,7 @@ exports[`application-status should match the snapshot with status OFFLINE 1`] =
<div <div
class="application-status" class="application-status"
> >
<font-awesome-icon <!---->
class="application-status__icon application-status__icon--OFFLINE"
icon="minus-circle"
/>
<!----> <!---->
</div> </div>
...@@ -42,10 +34,7 @@ exports[`application-status should match the snapshot with status OUT_OF_SERVICE ...@@ -42,10 +34,7 @@ exports[`application-status should match the snapshot with status OUT_OF_SERVICE
<div <div
class="application-status" class="application-status"
> >
<font-awesome-icon <!---->
class="application-status__icon application-status__icon--OUT_OF_SERVICE"
icon="ban"
/>
<!----> <!---->
</div> </div>
...@@ -55,10 +44,7 @@ exports[`application-status should match the snapshot with status RESTRICTED 1`] ...@@ -55,10 +44,7 @@ exports[`application-status should match the snapshot with status RESTRICTED 1`]
<div <div
class="application-status" class="application-status"
> >
<font-awesome-icon <!---->
class="application-status__icon application-status__icon--RESTRICTED"
icon="exclamation"
/>
<!----> <!---->
</div> </div>
...@@ -68,10 +54,7 @@ exports[`application-status should match the snapshot with status UNKNOWN 1`] = ...@@ -68,10 +54,7 @@ exports[`application-status should match the snapshot with status UNKNOWN 1`] =
<div <div
class="application-status" class="application-status"
> >
<font-awesome-icon <!---->
class="application-status__icon application-status__icon--UNKNOWN"
icon="question-circle"
/>
<!----> <!---->
</div> </div>
...@@ -81,10 +64,7 @@ exports[`application-status should match the snapshot with status UP with Timest ...@@ -81,10 +64,7 @@ exports[`application-status should match the snapshot with status UP with Timest
<div <div
class="application-status" class="application-status"
> >
<font-awesome-icon <!---->
class="application-status__icon application-status__icon--UP"
icon="check"
/>
<small> <small>
14m 14m
......
...@@ -27,6 +27,9 @@ describe('application-status', () => { ...@@ -27,6 +27,9 @@ describe('application-status', () => {
propsData: { propsData: {
status, status,
date date
},
stubs: {
'font-awesome-icon': true
} }
}); });
expect(wrapper.vm.$el).toMatchSnapshot(); expect(wrapper.vm.$el).toMatchSnapshot();
...@@ -60,4 +63,4 @@ describe('application-status', () => { ...@@ -60,4 +63,4 @@ describe('application-status', () => {
testSnapshotForStatus('?'); testSnapshotForStatus('?');
}); });
}); });
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment