Browse Source

Use mocha/mocha.js

master
Futago-za Ryuu 2 years ago
parent
commit
ed6690e5bb
  1. 4
      test/browser.stub.js
  2. 1
      test/package.json
  3. 2
      webpack.config.js
  4. 50
      yarn.lock

4
test/browser.js → test/browser.stub.js

@ -5,7 +5,9 @@
and create a valid bundled file that executes on the browser.
*/
const context = require.context( "mocha-loader!./", true, /.+\.(spec|test)\.js?$/ );
require( "mocha/mocha.js" );
const context = require.context( "./", true, /.+\.(spec|test)\.js?$/ );
context.keys().forEach( context );

1
test/package.json

@ -5,7 +5,6 @@
"dependencies": {
"chai": "4.2.0",
"chai-like": "1.1.1",
"mocha-loader": "2.0.0",
"sinon": "7.2.3"
}
}

2
webpack.config.js

@ -27,7 +27,7 @@ module.exports = [
entry: {
"benchmark": require.resolve( "@pegjs/benchmark-suite/browser.js" ),
"test": require.resolve( "@pegjs/spec-suite/browser.js" ),
"test": require.resolve( "@pegjs/spec-suite/browser.stub.js" ),
},
library: [ "peg", "[name]" ],
output: "docs/.vuepress/public/[name]-bundle.min.js",

50
yarn.lock

@ -2369,24 +2369,6 @@ css-loader@^0.28.11:
postcss-value-parser "^3.3.0"
source-list-map "^2.0.0"
css-loader@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-1.0.1.tgz#6885bb5233b35ec47b006057da01cc640b6b79fe"
integrity sha512-+ZHAZm/yqvJ2kDtPne3uX0C+Vr3Zn5jFn2N4HywtS5ujwvsVkyg0VArEXpl3BgczDA8anieki1FIzhchX4yrDw==
dependencies:
babel-code-frame "^6.26.0"
css-selector-tokenizer "^0.7.0"
icss-utils "^2.1.0"
loader-utils "^1.0.2"
lodash "^4.17.11"
postcss "^6.0.23"
postcss-modules-extract-imports "^1.2.0"
postcss-modules-local-by-default "^1.2.0"
postcss-modules-scope "^1.1.0"
postcss-modules-values "^1.3.0"
postcss-value-parser "^3.3.0"
source-list-map "^2.0.0"
css-parse@1.7.x:
version "1.7.0"
resolved "https://registry.yarnpkg.com/css-parse/-/css-parse-1.7.0.tgz#321f6cf73782a6ff751111390fc05e2c657d8c9b"
@ -5186,16 +5168,6 @@ mocha-junit-reporter@1.18.0:
strip-ansi "^4.0.0"
xml "^1.0.0"
mocha-loader@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/mocha-loader/-/mocha-loader-2.0.0.tgz#7d32723b0e27ba583fee0031601fea6bd6cd16a5"
integrity sha512-WYFbhZGCCBmQOavgKo49aAdv4C7QEll+/WU/KhiIQNaegG4JSP362BGvXQkk9J+jd/8bV2PxgmD7LbFOXigtoA==
dependencies:
css-loader "^1.0.0"
loader-utils "^1.1.0"
script-loader "^0.7.2"
style-loader "^0.22.1"
mocha-multi-reporters@1.1.7:
version "1.1.7"
resolved "https://registry.yarnpkg.com/mocha-multi-reporters/-/mocha-multi-reporters-1.1.7.tgz#cc7f3f4d32f478520941d852abb64d9988587d82"
@ -6240,7 +6212,7 @@ postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0
source-map "^0.5.6"
supports-color "^3.2.3"
postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.17, postcss@^6.0.23:
postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.17:
version "6.0.23"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324"
integrity sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==
@ -6461,11 +6433,6 @@ raw-body@2.3.3:
iconv-lite "0.4.23"
unpipe "1.0.0"
raw-loader@~0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-0.5.1.tgz#0c3d0beaed8a01c966d9787bf778281252a979aa"
integrity sha1-DD0L6u2KAclm2Xh793goElKpeao=
rc@^1.2.7:
version "1.2.8"
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
@ -6862,13 +6829,6 @@ schema-utils@^1.0.0:
ajv-errors "^1.0.0"
ajv-keywords "^3.1.0"
script-loader@^0.7.2:
version "0.7.2"
resolved "https://registry.yarnpkg.com/script-loader/-/script-loader-0.7.2.tgz#2016db6f86f25f5cf56da38915d83378bb166ba7"
integrity sha512-UMNLEvgOAQuzK8ji8qIscM3GIrRCWN6MmMXGD4SD5l6cSycgGsCo0tX5xRnfQcoghqct0tjHjcykgI1PyBE2aA==
dependencies:
raw-loader "~0.5.1"
section-matter@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/section-matter/-/section-matter-1.0.0.tgz#e9041953506780ec01d59f292a19c7b850b84167"
@ -7403,14 +7363,6 @@ strip-json-comments@^2.0.1, strip-json-comments@~2.0.1:
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
style-loader@^0.22.1:
version "0.22.1"
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.22.1.tgz#901ea28aac78fcc00c5075585ac07d7ef3f87a52"
integrity sha512-WXUrLeinPIR1Oat3PfCDro7qTniwNTJqGqv1KcQiL3JR5PzrVLTyNsd9wTsPXG/qNCJ7lzR2NY/QDjFsP7nuSQ==
dependencies:
loader-utils "^1.1.0"
schema-utils "^0.4.5"
stylus-loader@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/stylus-loader/-/stylus-loader-3.0.2.tgz#27a706420b05a38e038e7cacb153578d450513c6"

Loading…
Cancel
Save