Add script to test in production

This commit is contained in:
Titus Wormer 2023-03-30 15:19:45 +02:00
parent b19151cedd
commit 11ee289355
No known key found for this signature in database
GPG key ID: E6E581152ED04E2E
2 changed files with 7 additions and 2 deletions

View file

@ -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"
},

View file

@ -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