Skip to content

Commit

Permalink
test(timeout): fix test timeout
Browse files Browse the repository at this point in the history
Some reverts > ok
  • Loading branch information
srod committed Nov 12, 2024
1 parent 518c11c commit d067a53
Show file tree
Hide file tree
Showing 19 changed files with 456 additions and 343 deletions.
Binary file modified bun.lockb
Binary file not shown.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"@node-minify/yui": "workspace:*",
"@tsconfig/node22": "^22.0.0",
"@types/node": "22.9.0",
"@vitest/coverage-v8": "2.1.4",
"@vitest/ui": "2.1.4",
"@vitest/coverage-v8": "1.6.0",
"@vitest/ui": "1.6.0",
"copyfiles": "2.4.1",
"husky": "9.1.6",
"lint-staged": "15.2.10",
Expand All @@ -69,7 +69,7 @@
"turbo": "2.2.3",
"typescript": "5.6.3",
"vite-tsconfig-paths": "5.1.2",
"vitest": "2.1.4"
"vitest": "1.6.0"
},
"lint-staged": {
"*.ts": [
Expand Down
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 d067a53

Please sign in to comment.