Skip to content

Commit 0633085

Browse files
Update packages/integration-tests/utils/fixtures.ts
Co-authored-by: Abhijeet Prasad <[email protected]>
1 parent a262fd6 commit 0633085

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/integration-tests/utils/fixtures.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ import path from 'path';
44

55
import { generatePage } from './generatePage';
66

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}`;
7+
const getAsset = (assetDir: string, asset: string): string => {
8+
const path = `${assetDir}/${asset}`;
9+
if (fs.existsSync(path)) {
10+
return path;
1211
}
12+
13+
return `${path.dirname(assetDir)}/${asset}`;
1314
};
1415

1516
export type TestOptions = {

0 commit comments

Comments
 (0)