Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Setup eslint config for test files (#888)
* chore: Setup eslint config for test folder

* style: Fix eslint errors in test files
  • Loading branch information
sudo-suhas authored and yyx990803 committed Jul 29, 2017
1 parent f5b5979 commit 5b13502
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
5 changes: 5 additions & 0 deletions test/.eslintrc
@@ -0,0 +1,5 @@
{
"env": {
"mocha": true
}
}
2 changes: 1 addition & 1 deletion test/fixtures/script-import.js
Expand Up @@ -4,4 +4,4 @@ export default {
msg: 'Hello from Component A!'
}
}
};
}
2 changes: 1 addition & 1 deletion test/fixtures/unit-test.js
@@ -1,5 +1,5 @@
describe('example', function () {
it('basic', function (done) {
done();
done()
})
})
23 changes: 12 additions & 11 deletions test/test.js
Expand Up @@ -8,9 +8,9 @@ var MemoryFS = require('memory-fs')
var expect = require('chai').expect
var hash = require('hash-sum')
var SSR = require('vue-server-renderer')
var compiler = require('../lib/template-compiler')
// var compiler = require('../lib/template-compiler')
var normalizeNewline = require('normalize-newline')
var ExtractTextPlugin = require("extract-text-webpack-plugin")
var ExtractTextPlugin = require('extract-text-webpack-plugin')
var SourceMapConsumer = require('source-map').SourceMapConsumer

var rawLoaderPath = path.resolve(__dirname, '../index.js')
Expand Down Expand Up @@ -602,11 +602,11 @@ describe('vue-loader', function () {
})
}, (code, warnings) => {
// http://stackoverflow.com/questions/17581830/load-node-js-module-from-string-in-memory
function requireFromString(src, filename) {
var Module = module.constructor;
var m = new Module();
m._compile(src, filename);
return m.exports;
function requireFromString (src, filename) {
var Module = module.constructor
var m = new Module()
m._compile(src, filename)
return m.exports
}

var output = interopDefault(requireFromString(code, './test.build.js'))
Expand Down Expand Up @@ -780,11 +780,11 @@ describe('vue-loader', function () {
options: {
skeletonLoader: {
procedure: (content, sourceMap, callback, options) => {
expect(options.foo).to.equal('bar');
expect(options.opt2).to.equal('value2');
expect(options.foo).to.equal('bar')
expect(options.opt2).to.equal('value2')

// Return the content to output.
return content;
return content
}
}
}
Expand Down Expand Up @@ -870,7 +870,8 @@ describe('vue-loader', function () {
}
}, (window, module) => {
var results = []
var vnode = mockRender(module, {
// var vnode =
mockRender(module, {
$processStyle: style => results.push(style),
transform: 'translateX(10px)'
})
Expand Down

0 comments on commit 5b13502

Please sign in to comment.