diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6322a07..4ca10a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,3 +26,7 @@ jobs: - name: Test run: yarn test --ci --coverage --maxWorkers=2 + + - name: Run Node.js Environment Test for @graphcms/html-to-slate-ast + run: yarn test:node + working-directory: ./packages/html-to-slate-ast diff --git a/packages/html-to-slate-ast/examples/node-script.js b/packages/html-to-slate-ast/examples/node-script.js index 6c1fd28..4334080 100644 --- a/packages/html-to-slate-ast/examples/node-script.js +++ b/packages/html-to-slate-ast/examples/node-script.js @@ -11,4 +11,7 @@ async function main() { main() .then(() => process.exit(0)) - .catch(e => console.error(e)); + .catch(e => { + console.error(e); + process.exit(1); + }); diff --git a/packages/html-to-slate-ast/package.json b/packages/html-to-slate-ast/package.json index 8384a80..a658be4 100644 --- a/packages/html-to-slate-ast/package.json +++ b/packages/html-to-slate-ast/package.json @@ -9,7 +9,8 @@ "test": "tsdx test --passWithNoTests", "test:watch": "tsdx test --watch --passWithNoTests", "lint": "tsdx lint", - "prepublish": "npm run build" + "prepublish": "npm run build", + "test:node": "node examples/node-script.js" }, "peerDependencies": { "slate": "^0.66.1", diff --git a/packages/html-to-slate-ast/tsup.config.ts b/packages/html-to-slate-ast/tsup.config.ts index d125a92..2f213e5 100644 --- a/packages/html-to-slate-ast/tsup.config.ts +++ b/packages/html-to-slate-ast/tsup.config.ts @@ -10,5 +10,5 @@ export default defineConfig(options => ({ treeshake: true, clean: true, format: ['esm', 'cjs'], - skipNodeModulesBundle: true, + // skipNodeModulesBundle: true, }));