Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
willybrauner committed Feb 6, 2024
1 parent ffef990 commit a393b60
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 7 deletions.
1 change: 1 addition & 0 deletions apps/front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"terser": "^5.27.0",
"typescript": "^5.3.3",
"vite": "^5.0.12",
"vite-tsconfig-paths": "^4.3.1",
"vitest": "^1.2.2"
},
"browserslist": [
Expand Down
9 changes: 6 additions & 3 deletions apps/front/prerender/__tests__/ManifestParser.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { expect, it } from "vitest"
import { ManifestParser } from "../helpers/ManifestParser"
import * as mfs from "@cher-ami/mfs"
import config from "../../config/config.js"
import path from "path"
import { fileURLToPath } from "url"
const url = import.meta.url

// @ts-ignore
const manifestRaw = await mfs.readFile(`${config.outDirStatic}/manifest.json`)
const manifestRaw = await mfs.readFile(
path.join(path.dirname(fileURLToPath(url)), `fixtures/manifest.json`),
)

it("should return assets list", () => {
const assets = ManifestParser.getAssets(manifestRaw)
Expand Down
46 changes: 46 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
"devDependencies": {
"@cher-ami/debug": "^1.2.0",
"@cher-ami/mfs": "^0.2.0",
"@types/node": "^20.11.7",
"chalk": "^5.3.0",
"change-case": "^5.4.2",
"lint-staged": "^15.2.1",
"husky": "^9.0.10",
"prettier": "^3.2.5",
"inquirer": "^9.2.14",
"chalk": "^5.3.0",
"@types/node": "^20.11.7",
"lint-staged": "^15.2.1",
"prettier": "^3.2.5",
"turbo": "^1.11.3"
},
"workspaces": [
Expand Down

0 comments on commit a393b60

Please sign in to comment.