We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a262fd6 commit 0633085Copy full SHA for 0633085
packages/integration-tests/utils/fixtures.ts
@@ -4,12 +4,13 @@ import path from 'path';
4
5
import { generatePage } from './generatePage';
6
7
-const getAsset = function(assetDir: string, asset: string): string {
8
- if (fs.existsSync(`${assetDir}/${asset}`)) {
9
- return `${assetDir}/${asset}`;
10
- } else {
11
- return `${path.dirname(assetDir)}/${asset}`;
+const getAsset = (assetDir: string, asset: string): string => {
+ const path = `${assetDir}/${asset}`;
+ if (fs.existsSync(path)) {
+ return path;
12
}
+
13
+ return `${path.dirname(assetDir)}/${asset}`;
14
};
15
16
export type TestOptions = {
0 commit comments