Created
January 27, 2016 19:28
Revisions
-
taylorzane created this gist
Jan 27, 2016 .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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ chai = require 'chai' sinon = require 'sinon' sinonChai = require 'sinon-chai' expect = chai.expect chai.use sinonChai Async = require 'async' vm = new Vue el: '#test' describe 'Vue', -> beforeEach -> doSetup() it 'Has a Foo instance', (done) -> # $vm.components.etc 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ gulp.task 'test:integration', (done) -> testWebpack = require 'webpack' webpackDevServer = require 'webpack-dev-server' webpackTestConfig = require './src/webview/spec/webpack.test.config.coffee' compiler = testWebpack(webpackTestConfig) server = new webpackDevServer compiler, contentBase: './src/webview/spec' hot: true historyApiFallback: false quiet: false noInfo: false watchOptions: aggregateTimeout: 300 poll: 1000 publicPath: '/tests/' headers: 'X-Custom-Header': 'yes' stats: colors: true server.listen 3100, 'localhost', -> return done() 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ <html> <body> <div id="test"><router-view></router-view></div> <script src="/tests/commons.js"></script> <script src="/tests/spec.js"></script> </body> </html> 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ webpack = require 'webpack' path = require 'path' srcDir = path.resolve __dirname, '..' # Config module.exports = context: srcDir entry: 'mocha!./spec/exampleSpec.coffee' output: path: '/' publicPath: '/tests/' filename: 'spec.js' chunkFilename: 'spec.chunk.js' module: loaders: [ test: /\.coffee$/, loader: 'coffee' ] noParse: [ /node_modules\/sinon\// ] resolve: modulesDirectories: ['src/webview', 'node_modules'] extensions: ['', '.coffee', '.js'] alias: sinon: 'sinon/pkg/sinon.js' node: fs: 'empty' plugins: [ new webpack.ProvidePlugin 'Vue': 'vue/dist/vue.js' new webpack.optimize.CommonsChunkPlugin('commons.js') ]