Merge pull request #3150 from thelounge/astorije/test-stuff

Replace mocha-webpack with mochapack, and remove browser test setup that we never used
This commit is contained in:
Pavel Djundik 2019-03-27 10:13:59 +02:00 committed by GitHub
commit 5723be00c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 65 additions and 683 deletions

View file

@ -19,8 +19,7 @@
"lint:js": "eslint . --ext .js,.vue --report-unused-disable-directives --color",
"start": "node index start",
"test": "run-p --aggregate-output --continue-on-error lint:* test:{client,server}",
"test:browser": "webpack-dev-server --config=webpack.config-browser.js",
"test:client": "nyc --nycrc-path=test/.nycrc-mocha-webpack mocha-webpack --colors --opts=test/mocha-webpack.opts",
"test:client": "nyc --nycrc-path=test/.nycrc-mochapack mochapack --colors --opts=test/mochapack.opts",
"test:server": "nyc --nycrc-path=test/.nycrc-mocha mocha --colors",
"watch": "webpack --watch"
},
@ -94,8 +93,7 @@
"jquery": "3.3.1",
"mini-css-extract-plugin": "0.5.0",
"mocha": "6.0.2",
"mocha-loader": "2.0.1",
"mocha-webpack": "2.0.0-beta.0",
"mochapack": "1.1.0",
"moment": "2.24.0",
"mousetrap": "1.6.3",
"npm-run-all": "4.1.5",
@ -113,7 +111,6 @@
"vue-template-compiler": "2.6.10",
"vuedraggable": "2.20.0",
"webpack": "4.29.6",
"webpack-cli": "3.3.0",
"webpack-dev-server": "3.2.1"
"webpack-cli": "3.3.0"
}
}

View file

@ -1,22 +0,0 @@
"use strict";
const path = require("path");
const config = require("./webpack.config.js");
config.entry = {
"js/bundle.test.js": `mocha-loader!${path.join(__dirname, "test/client/index.js")}`,
};
// Instrumentation for testing with mocha
config.module.rules.push({
test: /\.js$/,
include: path.join(__dirname, "test/client/js/*"),
use: "mocha-loader",
});
// Tell the webserver where to load the HTML reporter file from
config.devServer = {
contentBase: path.join(__dirname, "test/client"),
};
module.exports = config;

717
yarn.lock

File diff suppressed because it is too large Load diff