diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index d61bd006..1d12b37a 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -151,6 +151,12 @@ jobs: - name: Build editor-ext run: pnpm --filter @docmost/editor-ext build + # @docmost/prosemirror-markdown is an ESM workspace package the server + # imports at runtime; its build/ is gitignored and test:e2e has no pretest + # hook, so build it before the e2e run (mirrors the test.yml job). + - name: Build prosemirror-markdown + run: pnpm --filter @docmost/prosemirror-markdown build + - name: Run migrations run: pnpm --filter ./apps/server migration:latest diff --git a/apps/server/test/jest-e2e.json b/apps/server/test/jest-e2e.json index c7a61c13..2d696eb7 100644 --- a/apps/server/test/jest-e2e.json +++ b/apps/server/test/jest-e2e.json @@ -4,10 +4,14 @@ "testEnvironment": "node", "testRegex": ".e2e-spec.ts$", "transform": { + "prosemirror-markdown/build/.+\\.js$": [ + "babel-jest", + { "presets": [["@babel/preset-env", { "targets": { "node": "current" } }]] } + ], "^.+\\.(t|j)sx?$": ["ts-jest", { "tsconfig": { "allowJs": true } }] }, "transformIgnorePatterns": [ - "/node_modules/(?!(\\.pnpm/)?(nanoid|uuid|image-dimensions|marked|happy-dom|lib0|@sindresorhus[+/][a-z0-9-]+|escape-string-regexp|p-limit|yocto-queue)(@|/))" + "/node_modules/(?!(\\.pnpm/)?(nanoid|uuid|image-dimensions|marked|happy-dom|lib0|@sindresorhus[+/][a-z0-9-]+|escape-string-regexp|p-limit|yocto-queue|@docmost/prosemirror-markdown)(@|/))" ], "moduleNameMapper": { "^@docmost/db/(.*)$": "/../src/database/$1", diff --git a/apps/server/test/jest-integration.json b/apps/server/test/jest-integration.json index 1f42191e..30f62397 100644 --- a/apps/server/test/jest-integration.json +++ b/apps/server/test/jest-integration.json @@ -4,10 +4,14 @@ "testRegex": ".*\\.int-spec\\.ts$", "testPathIgnorePatterns": ["/node_modules/"], "transform": { + "prosemirror-markdown/build/.+\\.js$": [ + "babel-jest", + { "presets": [["@babel/preset-env", { "targets": { "node": "current" } }]] } + ], "^.+\\.(t|j)sx?$": "ts-jest" }, "transformIgnorePatterns": [ - "/node_modules/(?!(\\.pnpm/)?(nanoid|uuid|image-dimensions|marked|happy-dom|lib0)(@|/))" + "/node_modules/(?!(\\.pnpm/)?(nanoid|uuid|image-dimensions|marked|happy-dom|lib0|@docmost/prosemirror-markdown)(@|/))" ], "testEnvironment": "node", "testTimeout": 60000,