Skip to content

Commit 117211f

Browse files
committed
Fixed tests
Signed-off-by: Jaid <jaid.jsx@gmail.com>
1 parent 49fba2d commit 117211f

File tree

3 files changed

+23
-13
lines changed

3 files changed

+23
-13
lines changed

package-lock.json

Lines changed: 10 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
},
1616
"dependencies": {
1717
"better-docs": "^1.1.4",
18+
"debug": "^4.1.1",
1819
"first-existing-path": "^1.0.1",
1920
"jsdoc-api": "^4.0.3",
2021
"jsdoc-babel": "^0.5.0",
@@ -49,8 +50,8 @@
4950
"build:prod": "cross-env NODE_ENV=production webpack",
5051
"build:dev": "webpack",
5152
"test": "jest && npm run build:prod && cross-env MAIN=dist jest",
52-
"test:dev": "npm run build:dev && jest",
53-
"test:debug": "node --inspect=9229 node_modules/jest/bin/jest.js --runInBand",
53+
"test:dev": "jest",
54+
"test:debug": "cross-env DEBUG=$(basename $PWD) cross-env node --inspect node_modules/jest/bin/jest.js --runInBand",
5455
"release": "npm test && cross-env git tag v$npm_package_version && git push --tags && cross-env opn https://github.com/$npm_package_author_name/$(basename $PWD)/releases/new?tag=v$npm_package_version"
5556
}
5657
}

test/index.test.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const {default: JsdocTsdWebpackPlugin} = indexModule
1313
jest.setTimeout(60 * 1000)
1414

1515
const runWebpack = async (name, extraConfig) => {
16-
const stats = await (pify(webpack)({
16+
const stats = await pify(webpack)({
1717
target: "node",
1818
mode: "production",
1919
devtool: "inline-source-map",
@@ -23,7 +23,7 @@ const runWebpack = async (name, extraConfig) => {
2323
path: path.join(__dirname, name, "dist"),
2424
},
2525
...extraConfig,
26-
}))
26+
})
2727
await fsp.outputJson5(path.join(__dirname, name, "info", "stats.json5"), stats.toJson(), {space: 2})
2828
return stats
2929
}
@@ -48,17 +48,23 @@ it("should run with {babel: true}", async () => {
4848
plugins: [
4949
new CleanWebpackPlugin,
5050
new JsdocTsdWebpackPlugin({
51-
babel: {presets: ["jaid"]},
51+
babel: {
52+
presets: ["jaid"],
53+
},
54+
jsdocTsdConfig: {
55+
pedantic: true,
56+
},
5257
}),
5358
new PublishimoWebpackPlugin,
5459
],
5560
module: {
5661
rules: [
5762
{
5863
test: /\.js$/,
59-
exclude: /node_modules\//,
64+
include: /src\//,
6065
use: {
6166
loader: "babel-loader",
67+
options: {presets: ["jaid"]},
6268
},
6369
},
6470
],

0 commit comments

Comments
 (0)