Skip to content
Snippets Groups Projects
Verified Commit 6e15373d authored by Georg Krause's avatar Georg Krause
Browse files

Remove unit tests

parent 60a1ec4d
No related branches found
No related tags found
1 merge request!13Update to Vue3
...@@ -7,8 +7,7 @@ ...@@ -7,8 +7,7 @@
"build": "scripts/i18n-compile.sh && vue-cli-service build", "build": "scripts/i18n-compile.sh && vue-cli-service build",
"lint": "vue-cli-service lint", "lint": "vue-cli-service lint",
"i18n-compile": "scripts/i18n-compile.sh", "i18n-compile": "scripts/i18n-compile.sh",
"i18n-extract": "scripts/i18n-extract.sh", "i18n-extract": "scripts/i18n-extract.sh"
"test:unit": "vue-cli-service test:unit"
}, },
"dependencies": { "dependencies": {
"@jshmrtn/vue3-gettext": "^1.1.0", "@jshmrtn/vue3-gettext": "^1.1.0",
...@@ -25,10 +24,8 @@ ...@@ -25,10 +24,8 @@
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "5.0.0-beta.3", "@vue/cli-plugin-babel": "5.0.0-beta.3",
"@vue/cli-plugin-eslint": "5.0.0-beta.3", "@vue/cli-plugin-eslint": "5.0.0-beta.3",
"@vue/cli-plugin-unit-jest": "5.0.0-beta.3",
"@vue/cli-service": "^5.0.0-beta.3", "@vue/cli-service": "^5.0.0-beta.3",
"@vue/compiler-sfc": "^3.1.0", "@vue/compiler-sfc": "^3.1.0",
"@vue/test-utils": "^2.0.0-rc.14",
"babel-core": "7.0.0-bridge.0", "babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-jest": "26", "babel-jest": "26",
...@@ -36,12 +33,10 @@ ...@@ -36,12 +33,10 @@
"easygettext": "^2.7.0", "easygettext": "^2.7.0",
"eslint": "^7.32.0", "eslint": "^7.32.0",
"eslint-plugin-vue": "^7.17.0", "eslint-plugin-vue": "^7.17.0",
"jest": "26",
"node-sass": "6.0.1", "node-sass": "6.0.1",
"prerender-spa-plugin": "^3.4.0", "prerender-spa-plugin": "^3.4.0",
"sass-loader": "^10.1.1", "sass-loader": "^10.1.1",
"style-loader": "^3.2.1", "style-loader": "^3.2.1"
"vue-jest": "^5.0.0-alpha.10"
}, },
"eslintConfig": { "eslintConfig": {
"root": true, "root": true,
......
module.exports = {
env: {
jest: true
}
}
\ No newline at end of file
import { mount, config } from '@vue/test-utils'
import '@/setup'
import {getTasks} from '@/data'
import Guide from '@/views/Guide'
const Fake = {
$pgettext: function(a, b) { return b },
$language: {
current: 'en_US'
},
}
const guides = getTasks(Fake)
config.silent = false
describe("Guide", () => {
guides.filter((e) => {
return e.steps && e.steps.length > 0
}).forEach(g => {
// render the component
it(`renders guide ${g.name}`, () => {
const wrapper = mount(Guide, {
propsData: { slug: g.slug },
mocks: Fake,
stubs: ['router-link'],
})
expect(wrapper.text()).toContain(g.name)
expect(wrapper.text()).toContain(g.summary)
g.steps.forEach((s) => {
expect(wrapper.text()).toContain(s.title)
s.content.forEach(r => {
expect(wrapper.text()).toContain(r)
})
})
})
})
});
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment