Skip to content

Commit

Permalink
test(timeout): fix test timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
srod committed Nov 11, 2024
1 parent 3545338 commit e2a9ffe
Show file tree
Hide file tree
Showing 18 changed files with 453 additions and 340 deletions.
Binary file modified bun.lockb
Binary file not shown.
43 changes: 30 additions & 13 deletions packages/babel-minify/__tests__/babel-minify.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,34 @@ import babelMinify from "../src";
const compressorLabel = "babel-minify";
const compressor = babelMinify;

describe("Package: babel-minify", () => {
tests.commonjs.forEach((options) => {
runOneTest({ options, compressorLabel, compressor });
});
tests.babelMinify.forEach((options) => {
runOneTest({ options, compressorLabel, compressor });
});
tests.commonjs.forEach((options) => {
runOneTest({ options, compressorLabel, compressor, sync: true });
});
tests.babelMinify.forEach((options) => {
runOneTest({ options, compressorLabel, compressor, sync: true });
});
describe("Package: babel-minify", async () => {
// Run commonjs async tests
for (const options of tests.commonjs) {
await runOneTest({ options, compressorLabel, compressor });
}

// Run babelMinify async tests
for (const options of tests.babelMinify) {
await runOneTest({ options, compressorLabel, compressor });
}

// Run commonjs sync tests
for (const options of tests.commonjs) {
await runOneTest({
options,
compressorLabel,
compressor,
sync: true,
});
}

// Run babelMinify sync tests
for (const options of tests.babelMinify) {
await runOneTest({
options,
compressorLabel,
compressor,
sync: true,
});
}
});
18 changes: 11 additions & 7 deletions packages/clean-css/__tests__/clean-css.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ import cleanCss from "../src";
const compressorLabel = "clean-css";
const compressor = cleanCss;

describe("Package: clean-css", () => {
tests.commoncss.forEach((options) => {
runOneTest({ options, compressorLabel, compressor });
});
tests.commoncss.forEach((options) => {
runOneTest({ options, compressorLabel, compressor, sync: true });
});
describe("Package: clean-css", async () => {
// Run async tests
for (const options of tests.commoncss) {
await runOneTest({ options, compressorLabel, compressor });
}

// Run sync tests
for (const options of tests.commoncss) {
await runOneTest({ options, compressorLabel, compressor, sync: true });
}

test("should compress with some options", (): Promise<void> =>
new Promise<void>((done) => {
const options: OptionsTest = {
Expand Down
Loading

0 comments on commit e2a9ffe

Please sign in to comment.