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 af6380d
Show file tree
Hide file tree
Showing 4 changed files with 168 additions and 14 deletions.
12 changes: 11 additions & 1 deletion apps/front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@
"iOS >= 12"
],
"optionalDependencies": {
"@rollup/rollup-linux-x64-gnu": "^4.9.6"
"@rollup/rollup-linux-x64-gnu": "^4.9.6",
"@swc/core-darwin-arm64": "^1.4.0",
"@swc/core-darwin-x64": "^1.4.0",
"@swc/core-linux-arm-gnueabihf": "^1.4.0",
"@swc/core-linux-arm64-gnu": "^1.4.0",
"@swc/core-linux-arm64-musl": "^1.4.0",
"@swc/core-linux-x64-gnu": "^1.4.0",
"@swc/core-linux-x64-musl": "^1.4.0",
"@swc/core-win32-arm64-msvc": "^1.4.0",
"@swc/core-win32-ia32-msvc": "^1.4.0",
"@swc/core-win32-x64-msvc": "^1.4.0"
}
}
12 changes: 8 additions & 4 deletions apps/front/prerender/__tests__/ManifestParser.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
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"
import * as fs from "fs"
const url = import.meta.url

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

it("should return assets list", () => {
const assets = ManifestParser.getAssets(manifestRaw)
Expand Down
150 changes: 145 additions & 5 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 af6380d

Please sign in to comment.