-
Notifications
You must be signed in to change notification settings - Fork 531
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
7 changed files
with
190 additions
and
6 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
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,3 +1,6 @@ | ||
/node_modules | ||
/test/specs.js | ||
.DS_Store | ||
.DS_Store | ||
node_modules/ | ||
npm-debug.log | ||
selenium-debug.log | ||
test/unit/coverage | ||
test/e2e/reports |
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,11 @@ | ||
// require all test files (files that ends with .spec.js) | ||
var testsContext = require.context('./specs', true, /\.spec$/); | ||
testsContext.keys().forEach(testsContext); | ||
|
||
/* | ||
// require all src files except main.js for coverage. | ||
// you can also change this to match only the subset of files that | ||
// you want coverage for. | ||
var srcContext = require.context('../../src', true, /^\.\/(?!main(\.js)?$)/) | ||
srcContext.keys().forEach(srcContext) | ||
*/ |
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,48 @@ | ||
var wsConfig = require('./webpack.test.config'); | ||
|
||
module.exports = function(config) { | ||
var settings = { | ||
// base path that will be used to resolve all patterns (eg. files, exclude) | ||
basePath: '', | ||
|
||
browsers: ['PhantomJS'], | ||
|
||
reporters: ['spec', 'coverage'], | ||
|
||
frameworks: ['mocha', 'chai'/*, 'sinon-chai'*/], | ||
|
||
files: ['./index.js'], | ||
|
||
exclude: [], | ||
|
||
preprocessors: { | ||
'./index.js': ['webpack', 'sourcemap'] | ||
}, | ||
|
||
webpack: wsConfig, | ||
|
||
webpackMiddleware: { | ||
noInfo: true | ||
}, | ||
|
||
port: 9876, | ||
|
||
colors: true, | ||
|
||
logLevel: config.LOG_INFO, | ||
|
||
autoWatch: false, | ||
|
||
singleRun: true, | ||
|
||
coverageReporter: { | ||
dir: './coverage', | ||
reporters: [ | ||
{ type: 'lcov', subdir: '.' }, | ||
{ type: 'text-summary' } | ||
] | ||
} | ||
} | ||
|
||
config.set(settings); | ||
} |
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,18 @@ | ||
import { expect } from "chai"; | ||
|
||
import VueFormGenerator from "src/index"; | ||
|
||
describe("VueFormGenerator", () => { | ||
|
||
it("class properties", () => { | ||
|
||
expect(true).to.be.true; | ||
|
||
expect(VueFormGenerator).to.be.exist; | ||
expect(VueFormGenerator).to.have.property("component"); | ||
expect(VueFormGenerator).to.have.property("schema"); | ||
expect(VueFormGenerator).to.have.property("validators"); | ||
|
||
}); | ||
|
||
}) |
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,68 @@ | ||
var path = require("path"); | ||
var webpack = require('webpack'); | ||
|
||
module.exports = { | ||
devtool: '#inline-source-map', | ||
|
||
module: { | ||
loaders: [ | ||
{ | ||
"test": /\.js?$/, | ||
"exclude": /node_modules/, | ||
"loader": "babel", | ||
"query": { | ||
"presets": [ | ||
"es2015", | ||
"stage-0" | ||
], | ||
"plugins": [] | ||
} | ||
}, | ||
{ | ||
"test": /\.css?$/, | ||
"loader": "style!css" | ||
}, | ||
{ | ||
"test": /\.scss?$/, | ||
"loader": "style!css!sass" | ||
}, | ||
{ | ||
"test": /\.jade?$/, | ||
"loader": "jade" | ||
}, | ||
{ | ||
"test": /\.vue?$/, | ||
"loader": "vue" | ||
}, | ||
{ | ||
test: /\.(woff2?|svg)$/, | ||
loader: 'url' | ||
//loader: 'url?limit=10000' | ||
}, | ||
{ | ||
test: /\.(ttf|eot)$/, | ||
loader: 'url' | ||
} | ||
] | ||
}, | ||
|
||
resolve: { | ||
packageAlias: 'browser', | ||
alias: { | ||
'src': path.resolve(__dirname, '../../src') | ||
} | ||
}, | ||
|
||
plugins: [ | ||
], | ||
|
||
vue: { | ||
autoprefixer: { | ||
browsers: ['last 2 versions'] | ||
}/*, | ||
loaders: { | ||
js: 'isparta' | ||
}*/ | ||
} | ||
|
||
}; |