Can now launch tests

This commit is contained in:
Eliot Berriot 2018-01-08 23:12:31 +01:00
parent ede72d62b0
commit 91d6a71a21
No known key found for this signature in database
GPG Key ID: DD6965E2476E5C27
5 changed files with 6 additions and 13 deletions

View File

@ -46,6 +46,7 @@
"cross-env": "^4.0.0", "cross-env": "^4.0.0",
"cross-spawn": "^5.0.1", "cross-spawn": "^5.0.1",
"css-loader": "^0.28.0", "css-loader": "^0.28.0",
"es6-promise": "^4.2.2",
"eslint": "^3.19.0", "eslint": "^3.19.0",
"eslint-config-standard": "^6.2.1", "eslint-config-standard": "^6.2.1",
"eslint-friendly-formatter": "^2.0.7", "eslint-friendly-formatter": "^2.0.7",

View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -4,7 +4,7 @@ class Config {
if (this.BACKEND_URL === '/') { if (this.BACKEND_URL === '/') {
this.BACKEND_URL = window.location.protocol + '//' + window.location.hostname + ':' + window.location.port 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.BACKEND_URL += '/'
} }
this.API_URL = this.BACKEND_URL + 'api/v1/' this.API_URL = this.BACKEND_URL + 'api/v1/'

View File

@ -14,7 +14,10 @@ module.exports = function (config) {
browsers: ['PhantomJS'], browsers: ['PhantomJS'],
frameworks: ['mocha', 'sinon-chai', 'phantomjs-shim'], frameworks: ['mocha', 'sinon-chai', 'phantomjs-shim'],
reporters: ['spec', 'coverage'], reporters: ['spec', 'coverage'],
files: ['./index.js'], files: [
'../../node_modules/es6-promise/dist/es6-promise.auto.js',
'./index.js'
],
preprocessors: { preprocessors: {
'./index.js': ['webpack', 'sourcemap'] './index.js': ['webpack', 'sourcemap']
}, },

View File

@ -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')
})
})