From 11ee2893552bb93da5f16ddf61c065752baeac7f Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 30 Mar 2023 15:19:45 +0200 Subject: [PATCH] Add script to test in production --- package.json | 4 +++- test/index.js | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0fe446b..82d7040 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,9 @@ "prepack": "npm run build && npm run format", "build": "tsc --build --clean && tsc --build && type-coverage && micromark-build", "format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix", - "test-api": "node --conditions development test/index.js", + "test-api-prod": "node --conditions production test/index.js", + "test-api-dev": "node --conditions development test/index.js", + "test-api": "npm run test-api-dev && npm run test-api-prod", "test-coverage": "c8 --100 --reporter lcov npm run test-api", "test": "npm run build && npm run format && npm run test-coverage" }, diff --git a/test/index.js b/test/index.js index 3a8aca9..7078032 100644 --- a/test/index.js +++ b/test/index.js @@ -8,7 +8,10 @@ import assert from 'node:assert/strict' import test from 'node:test' import {micromark} from 'micromark' import {htmlVoidElements} from 'html-void-elements' -import {directive as syntax, directiveHtml as html} from '../dev/index.js' +import { + directive as syntax, + directiveHtml as html +} from 'micromark-extension-directive' const own = {}.hasOwnProperty