Skip to content

Commit 7df673a

Browse files
committed
fix: 🐛 postcss installation check
1 parent ac4c954 commit 7df673a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Diff for: src/modules/hasDepInstalled.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ const cachedResult: Record<string, boolean> = {};
22

33
export async function hasDepInstalled(dep: string) {
44
if (cachedResult[dep] != null) {
5-
return cachedResult;
5+
return cachedResult[dep];
66
}
77

88
let result = false;
99

1010
try {
1111
await import(dep);
12+
1213
result = true;
1314
} catch (e) {
15+
console.log(e);
1416
result = false;
1517
}
1618

Diff for: test/transformers/babel.test.ts

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ const BABEL_CONFIG = {
1616
],
1717
};
1818

19+
beforeAll(() => jest.setTimeout(10000));
20+
afterAll(() => jest.setTimeout(5000));
21+
1922
describe('transformer - babel', () => {
2023
it('transpiles with babel', async () => {
2124
const template = `<script>

0 commit comments

Comments
 (0)