mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-06 18:18:53 +08:00
karma attempt
This commit is contained in:
156
karma.conf.js
Normal file
156
karma.conf.js
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
// Karma configuration
|
||||||
|
"use strict";
|
||||||
|
const path = require("path");
|
||||||
|
const VueLoaderPlugin = require("vue-loader/lib/plugin");
|
||||||
|
|
||||||
|
function resolve(dir) {
|
||||||
|
console.log('HELLO!!!', path.join(__dirname, dir))
|
||||||
|
return path.join(__dirname, dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = function(config) {
|
||||||
|
config.set({
|
||||||
|
// base path that will be used to resolve all patterns (eg. files, exclude)
|
||||||
|
basePath: "",
|
||||||
|
|
||||||
|
// frameworks to use
|
||||||
|
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
||||||
|
frameworks: ["mocha", "sinon-chai"],
|
||||||
|
|
||||||
|
// list of files / patterns to load in the browser
|
||||||
|
files: ["tests/unit/*.spec.js"],
|
||||||
|
// files: ["./karma.files.js"],
|
||||||
|
|
||||||
|
// list of files / patterns to exclude
|
||||||
|
exclude: [],
|
||||||
|
|
||||||
|
// preprocess matching files before serving them to the browser
|
||||||
|
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
||||||
|
preprocessors: {
|
||||||
|
"tests/unit/*.spec.js": ["webpack"]
|
||||||
|
//"./karma.files.js": ["webpack"]
|
||||||
|
},
|
||||||
|
|
||||||
|
// test results reporter to use
|
||||||
|
// possible values: 'dots', 'progress'
|
||||||
|
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
||||||
|
reporters: ["spec", "coverage"],
|
||||||
|
|
||||||
|
coverageReporter: {
|
||||||
|
dir: "coverage",
|
||||||
|
reporters: [{ type: "lcov", subdir: "." }, { type: "text-summary" }]
|
||||||
|
},
|
||||||
|
|
||||||
|
// !!DONOT delete this reporter, or vue-cli-addon-ui-karma doesnot work
|
||||||
|
jsonResultReporter: {
|
||||||
|
outputFile: "report/karma-result.json",
|
||||||
|
isSynchronous: true
|
||||||
|
},
|
||||||
|
|
||||||
|
junitReporter: {
|
||||||
|
outputDir: "report", // results will be saved as $outputDir/$browserName.xml
|
||||||
|
outputFile: undefined, // if included, results will be saved as $outputDir/$browserName/$outputFile
|
||||||
|
suite: "", // suite will become the package name attribute in xml testsuite element
|
||||||
|
useBrowserName: true, // add browser name to report and classes names
|
||||||
|
nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
|
||||||
|
classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
|
||||||
|
properties: {} // key value pair of properties to add to the <properties> section of the report
|
||||||
|
},
|
||||||
|
|
||||||
|
// web server port
|
||||||
|
port: 9876,
|
||||||
|
|
||||||
|
// enable / disable colors in the output (reporters and logs)
|
||||||
|
colors: true,
|
||||||
|
|
||||||
|
// level of logging
|
||||||
|
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
||||||
|
logLevel: config.LOG_INFO,
|
||||||
|
|
||||||
|
// enable / disable watching file and executing tests whenever any file changes
|
||||||
|
autoWatch: true,
|
||||||
|
|
||||||
|
// start these browsers
|
||||||
|
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
||||||
|
browsers: ["ChromiumHeadless"],
|
||||||
|
|
||||||
|
// Continuous Integration mode
|
||||||
|
// if true, Karma captures browsers, runs the tests and exits
|
||||||
|
singleRun: true,
|
||||||
|
|
||||||
|
// Concurrency level
|
||||||
|
// how many browser should be started simultaneous
|
||||||
|
concurrency: Infinity,
|
||||||
|
|
||||||
|
client: {
|
||||||
|
captureConsole: true
|
||||||
|
},
|
||||||
|
browserConsoleLogOptions: {
|
||||||
|
terminal: true,
|
||||||
|
level: ""
|
||||||
|
},
|
||||||
|
webpack: {
|
||||||
|
mode: "development",
|
||||||
|
entry: "./src/main.js",
|
||||||
|
resolve: {
|
||||||
|
extensions: [".js", ".vue", ".json"],
|
||||||
|
alias: {
|
||||||
|
vue$: "vue/dist/vue.esm.js",
|
||||||
|
"@": resolve("src")
|
||||||
|
}
|
||||||
|
},
|
||||||
|
module: {
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
test: /\.js$/,
|
||||||
|
exclude: /(node_modules|bower_components)/,
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
loader: "babel-loader"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
loader: "istanbul-instrumenter-loader",
|
||||||
|
options: {
|
||||||
|
esModules: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
|
||||||
|
loader: "url-loader"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.vue$/,
|
||||||
|
loader: "vue-loader",
|
||||||
|
options: {
|
||||||
|
loaders: {
|
||||||
|
js: "babel-loader"
|
||||||
|
},
|
||||||
|
postLoaders: {
|
||||||
|
js: "istanbul-instrumenter-loader?esModules=true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.css$/,
|
||||||
|
use: ["vue-style-loader", "css-loader"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.scss$/,
|
||||||
|
use: ["vue-style-loader", "css-loader", "sass-loader"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
|
||||||
|
loader: "url-loader",
|
||||||
|
options: {
|
||||||
|
limit: 10000,
|
||||||
|
name: resolve("fonts/[name].[hash:7].[ext]")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
plugins: [new VueLoaderPlugin()]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
25779
package-lock.json
generated
25779
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "sqliteviz",
|
"name": "sqliteviz",
|
||||||
"version": "0.6.0",
|
"version": "0.6.0",
|
||||||
"license" : "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
@@ -32,7 +32,6 @@
|
|||||||
"@vue/cli-plugin-babel": "^4.4.0",
|
"@vue/cli-plugin-babel": "^4.4.0",
|
||||||
"@vue/cli-plugin-eslint": "^4.4.0",
|
"@vue/cli-plugin-eslint": "^4.4.0",
|
||||||
"@vue/cli-plugin-router": "^4.4.0",
|
"@vue/cli-plugin-router": "^4.4.0",
|
||||||
"@vue/cli-plugin-unit-mocha": "^4.4.0",
|
|
||||||
"@vue/cli-plugin-vuex": "^4.4.0",
|
"@vue/cli-plugin-vuex": "^4.4.0",
|
||||||
"@vue/cli-service": "^4.4.0",
|
"@vue/cli-service": "^4.4.0",
|
||||||
"@vue/eslint-config-standard": "^5.1.2",
|
"@vue/eslint-config-standard": "^5.1.2",
|
||||||
@@ -45,6 +44,7 @@
|
|||||||
"eslint-plugin-promise": "^4.2.1",
|
"eslint-plugin-promise": "^4.2.1",
|
||||||
"eslint-plugin-standard": "^4.0.0",
|
"eslint-plugin-standard": "^4.0.0",
|
||||||
"eslint-plugin-vue": "^6.2.2",
|
"eslint-plugin-vue": "^6.2.2",
|
||||||
|
"vue-cli-plugin-ui-karma": "^0.2.5",
|
||||||
"vue-template-compiler": "^2.6.11"
|
"vue-template-compiler": "^2.6.11"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user