Skip to content
Snippets Groups Projects
Verified Commit 91d6a71a authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Can now launch tests

parent ede72d62
No related branches found
No related tags found
No related merge requests found
......@@ -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",
......
File moved
......@@ -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']
},
......
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')
})
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment