joeytoday_obsidian-mp-publi.../vitest.config.ts
Duyuxuan b327cccc07 fix: apply code review fixes for PR #63
P1.1: unify counter parsing through resolveContent -> tokenizeContent,
      remove duplicate manual counter parsing in renderPseudoForElement
P1.2: add tokenizeContent for mixed string+counter content
      (e.g. "第" counter(h2) "章")
P2.1: add unique nanoid to tempStyle data-mp-temp attribute to prevent
      concurrent pollution during batch publishing
P2.2: skip CSS-wide keywords (none/inherit/initial/unset) in counter-reset/increment
Info.2: use regex match(/::(before|after)\\s*$/) instead of .includes()
Info.3: preserve CSS comments in removePseudoRulesFromCSS
Info.4: use .remove() instead of parentNode.removeChild() for tempStyle
Tests: add vitest + 45 unit tests for all pure functions

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 12:19:33 +08:00

8 lines
169 B
TypeScript

import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
include: ['src/**/*.test.ts'],
environment: 'jsdom',
},
});