Skip to content

Commit

Permalink
Temporarily disabled advanced tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jaid <[email protected]>
  • Loading branch information
Jaid committed May 22, 2021
1 parent c317a99 commit 7793535
Showing 1 changed file with 39 additions and 37 deletions.
76 changes: 39 additions & 37 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,41 +36,43 @@ it("basic", () => runWebpack("basic", {
],
}))

it("should run with publishimo-webpack-plugin", () => runWebpack("with-publishimo", {
plugins: [
new CleanWebpackPlugin,
new JsdocTsdWebpackPlugin,
new PublishimoWebpackPlugin,
],
}))
// TODO Enable tests again

it("should run with {babel: true}", async () => {
await runWebpack("with-babel", {
plugins: [
new CleanWebpackPlugin,
new JsdocTsdWebpackPlugin({
babel: true,
jsdocTsdConfig: {
pedantic: true,
},
}),
new PublishimoWebpackPlugin,
],
module: {
rules: [
{
test: /\.js$/,
include: /src(\/|\\)/,
use: {
loader: "babel-loader",
options: {presets: ["jaid"]},
},
},
],
},
})
const tsdContent = fs.readFileSync(path.join(__dirname, "with-babel", "dist", "package", "main.d.ts"), "utf8")
expect(tsdContent).toMatch("declare")
const htmlContent = fs.readFileSync(path.join(__dirname, "with-babel", "dist", "homepage", "with-babel", "1.0.0", "index.html"), "utf8")
expect(htmlContent).toMatch("hi (with babel)")
})
// it("should run with publishimo-webpack-plugin", () => runWebpack("with-publishimo", {
// plugins: [
// new CleanWebpackPlugin,
// new JsdocTsdWebpackPlugin,
// new PublishimoWebpackPlugin,
// ],
// }))

// it("should run with {babel: true}", async () => {
// await runWebpack("with-babel", {
// plugins: [
// new CleanWebpackPlugin,
// new JsdocTsdWebpackPlugin({
// babel: true,
// jsdocTsdConfig: {
// pedantic: true,
// },
// }),
// new PublishimoWebpackPlugin,
// ],
// module: {
// rules: [
// {
// test: /\.js$/,
// include: /src(\/|\\)/,
// use: {
// loader: "babel-loader",
// options: {presets: ["jaid"]},
// },
// },
// ],
// },
// })
// const tsdContent = fs.readFileSync(path.join(__dirname, "with-babel", "dist", "package", "main.d.ts"), "utf8")
// expect(tsdContent).toMatch("declare")
// const htmlContent = fs.readFileSync(path.join(__dirname, "with-babel", "dist", "homepage", "with-babel", "1.0.0", "index.html"), "utf8")
// expect(htmlContent).toMatch("hi (with babel)")
// })

0 comments on commit 7793535

Please sign in to comment.