This repository has been archived by the owner on Feb 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
73 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,4 @@ test | |
bower.json | ||
component.json | ||
gruntfile.js | ||
sauce_connect.log | ||
sauce_connect.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,42 @@ | ||
// we can just use the exact same webpack config by requiring it | ||
// but make sure to delete the normal entry | ||
var webpackConf = require('./webpack.base.config') | ||
delete webpackConf.entry | ||
|
||
module.exports = function (config) { | ||
config.set({ | ||
browsers: ['PhantomJS'], | ||
frameworks: ['jasmine'], | ||
reporters: ['spec'], | ||
reporters: ['spec', 'coverage'], | ||
// this is the entry file for all our tests. | ||
files: ['../test/unit/index.js'], | ||
// we will pass the entry file to webpack for bundling. | ||
preprocessors: { | ||
'../test/unit/index.js': ['webpack'] | ||
'../test/unit/index.js': ['webpack', 'sourcemap'] | ||
}, | ||
webpack: { | ||
devtool: '#inline-source-map', | ||
module: { | ||
loaders: [ | ||
{ | ||
test: /\.js$/, | ||
exclude: /test|node_modules|vue\/dist/, | ||
loader: 'babel?optional[]=runtime&loose=all' | ||
} | ||
], | ||
postLoaders: [ | ||
{ | ||
test: /\.js$/, | ||
exclude: /test|node_modules|vue\/dist|lib\//, | ||
loader: 'istanbul-instrumenter' | ||
} | ||
] | ||
} | ||
}, | ||
webpack: webpackConf, | ||
webpackMiddleware: { | ||
noInfo: true | ||
}, | ||
singleRun: true | ||
singleRun: true, | ||
coverageReporter: { | ||
reporters: [ | ||
{ type: 'lcov', dir: '../coverage', subdir: '.' }, | ||
{ type: 'text-summary', dir: '../coverage', subdir: '.' } | ||
] | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
var base = 'http://localhost:' + (process.env.PORT || 8002) | ||
|
||
module.exports = { | ||
'components e2e tests': function (browser) { | ||
browser | ||
.url(base) | ||
.waitForElementVisible('h1', 1000) | ||
.assert.containsText('.view', 'FOUR OH FOUR') | ||
|
||
// /components | ||
.url(base + '/components') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* global describe, it, expect */ | ||
|
||
import Vue from 'vue' | ||
import Menu from '../../../components/base/menu' | ||
|
||
describe('Base.Menu', () => { | ||
it('should render correct contents', () => { | ||
const vm = new Vue({ | ||
template: '<div><menu></menu></div>', | ||
components: { Menu } | ||
}).$mount() | ||
expect(vm.$el.querySelector('')) | ||
}) | ||
}) |