Can now launch tests
This commit is contained in:
parent
ede72d62b0
commit
91d6a71a21
|
@ -46,6 +46,7 @@
|
|||
"cross-env": "^4.0.0",
|
||||
"cross-spawn": "^5.0.1",
|
||||
"css-loader": "^0.28.0",
|
||||
"es6-promise": "^4.2.2",
|
||||
"eslint": "^3.19.0",
|
||||
"eslint-config-standard": "^6.2.1",
|
||||
"eslint-friendly-formatter": "^2.0.7",
|
||||
|
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
|
@ -4,7 +4,7 @@ class Config {
|
|||
if (this.BACKEND_URL === '/') {
|
||||
this.BACKEND_URL = window.location.protocol + '//' + window.location.hostname + ':' + window.location.port
|
||||
}
|
||||
if (!this.BACKEND_URL.endsWith('/')) {
|
||||
if (!this.BACKEND_URL.slice(-1) === '/') {
|
||||
this.BACKEND_URL += '/'
|
||||
}
|
||||
this.API_URL = this.BACKEND_URL + 'api/v1/'
|
||||
|
|
|
@ -14,7 +14,10 @@ module.exports = function (config) {
|
|||
browsers: ['PhantomJS'],
|
||||
frameworks: ['mocha', 'sinon-chai', 'phantomjs-shim'],
|
||||
reporters: ['spec', 'coverage'],
|
||||
files: ['./index.js'],
|
||||
files: [
|
||||
'../../node_modules/es6-promise/dist/es6-promise.auto.js',
|
||||
'./index.js'
|
||||
],
|
||||
preprocessors: {
|
||||
'./index.js': ['webpack', 'sourcemap']
|
||||
},
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
import Vue from 'vue'
|
||||
import Hello from '@/components/Hello'
|
||||
|
||||
describe('Hello.vue', () => {
|
||||
it('should render correct contents', () => {
|
||||
const Constructor = Vue.extend(Hello)
|
||||
const vm = new Constructor().$mount()
|
||||
expect(vm.$el.querySelector('.hello h1').textContent)
|
||||
.to.equal('Welcome to Your Vue.js App')
|
||||
})
|
||||
})
|
Loading…
Reference in New Issue