uses cli-plugin-unit-mocha from vue
This commit is contained in:
1086
frontend/package-lock.json
generated
1086
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint",
|
||||
"test": "mocha-webpack --webpack-config node_modules/@vue/cli-service/webpack.config.js --require test/setup.js test/**/*.spec.js"
|
||||
"test:unit": "vue-cli-service test:unit"
|
||||
},
|
||||
"dependencies": {
|
||||
"core-js": "^2.6.5",
|
||||
@@ -17,16 +17,15 @@
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^3.5.0",
|
||||
"@vue/cli-plugin-eslint": "^3.5.0",
|
||||
"@vue/cli-plugin-unit-mocha": "^3.6.0",
|
||||
"@vue/cli-service": "^3.6.0",
|
||||
"@vue/test-utils": "^1.0.0-beta.29",
|
||||
"@vue/test-utils": "1.0.0-beta.29",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"chai": "^4.2.0",
|
||||
"eslint": "^5.8.0",
|
||||
"eslint-plugin-vue": "^5.0.0",
|
||||
"jsdom": "^14.0.0",
|
||||
"jsdom-global": "^3.0.2",
|
||||
"mocha": "^6.1.4",
|
||||
"mocha-webpack": "^1.1.0",
|
||||
"stylus": "^0.54.5",
|
||||
"stylus-loader": "^3.0.1",
|
||||
"vue-cli-plugin-vuetify": "^0.5.0",
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import { shallowMount } from '@vue/test-utils'
|
||||
import RessourceField from '../src/components/RessourceField'
|
||||
|
||||
describe('RessourceField.vue', () => {
|
||||
|
||||
it('first test', () => {
|
||||
let field = shallowMount(RessourceField)
|
||||
expect(field).to.equal("Name")
|
||||
})
|
||||
})
|
||||
@@ -1,6 +0,0 @@
|
||||
require('jsdom-global')(undefined, { pretendToBeVisual: true, url: 'http://localhost' })
|
||||
|
||||
window.Date = Date
|
||||
global.expect = require('chai').expect
|
||||
|
||||
// See https://github.com/vuejs/vue-cli/issues/2128#issuecomment-453109575
|
||||
5
frontend/tests/unit/.eslintrc.js
Normal file
5
frontend/tests/unit/.eslintrc.js
Normal file
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
mocha: true
|
||||
}
|
||||
}
|
||||
13
frontend/tests/unit/example.spec.js
Normal file
13
frontend/tests/unit/example.spec.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { expect } from 'chai'
|
||||
import { shallowMount } from '@vue/test-utils'
|
||||
import HelloWorld from '@/components/RessourceField'
|
||||
|
||||
describe('HelloWorld.vue', () => {
|
||||
it('renders props.msg when passed', () => {
|
||||
const msg = 'new message'
|
||||
const wrapper = shallowMount(HelloWorld, {
|
||||
propsData: { msg }
|
||||
})
|
||||
expect(wrapper.text()).to.include(msg)
|
||||
})
|
||||
})
|
||||
@@ -1 +1 @@
|
||||
{"status":"done","publicPath":"http://localhost:8080/","chunks":{"null":[{"name":"0.js","publicPath":"http://localhost:8080/0.js","path":"/home/artus/Documents/cookAssistant/frontend/dist/0.js"}],"app":[{"name":"app.js","publicPath":"http://localhost:8080/app.js","path":"/home/artus/Documents/cookAssistant/frontend/dist/app.js"}]},"error":"ModuleError","message":"Module Error (from ./node_modules/vue-loader/lib/loaders/templateLoader.js):\n(Emitted value instead of an instance of Error) \n\n Errors compiling template:\n\n tag <span> has no matching end tag.\n\n 1 | \n 2 | <!-- Categories list -->\n | \n 3 | <span>\n | ^^^^^^\n 4 | <v-tabs v-if=\"showTabs\" :mandatory=\"false\">\n"}
|
||||
{"status":"done","publicPath":"http://localhost:8080/","chunks":{"main":[{"name":"main.js","publicPath":"http://localhost:8080/main.js","path":"/home/artus/Documents/cookAssistant/frontend/dist/main.js"}]}}
|
||||
Reference in New Issue
Block a user