|
| 1 | +import { fileURLToPath } from 'node:url' |
| 2 | +import yaml from 'js-yaml' |
| 3 | +import { expect, it } from 'vitest' |
| 4 | +import { getPackageExportsManifest } from 'vitest-package-exports' |
| 5 | + |
| 6 | +it('exports-snapshot', async () => { |
| 7 | + const manifest = await getPackageExportsManifest({ |
| 8 | + importMode: 'src', |
| 9 | + cwd: fileURLToPath(import.meta.url), |
| 10 | + }) |
| 11 | + expect(yaml.dump(manifest.exports)).toMatchInlineSnapshot(` |
| 12 | + ".: |
| 13 | + addClassToHast: function |
| 14 | + applyColorReplacements: function |
| 15 | + codeToHast: function |
| 16 | + codeToHtml: function |
| 17 | + codeToTokens: function |
| 18 | + codeToTokensBase: function |
| 19 | + codeToTokensWithThemes: function |
| 20 | + createCssVariablesTheme: function |
| 21 | + createdBundledHighlighter: function |
| 22 | + createHighlighterCore: function |
| 23 | + createHighlighterCoreSync: function |
| 24 | + createPositionConverter: function |
| 25 | + createShikiInternal: function |
| 26 | + createShikiInternalSync: function |
| 27 | + createSingletonShorthands: function |
| 28 | + enableDeprecationWarnings: function |
| 29 | + flatTokenVariants: function |
| 30 | + getSingletonHighlighterCore: function |
| 31 | + getTokenStyleObject: function |
| 32 | + guessEmbeddedLanguages: function |
| 33 | + hastToHtml: function |
| 34 | + isNoneTheme: function |
| 35 | + isPlainLang: function |
| 36 | + isSpecialLang: function |
| 37 | + isSpecialTheme: function |
| 38 | + makeSingletonHighlighter: function |
| 39 | + makeSingletonHighlighterCore: function |
| 40 | + normalizeGetter: function |
| 41 | + normalizeTheme: function |
| 42 | + resolveColorReplacements: function |
| 43 | + ShikiError: function |
| 44 | + splitLines: function |
| 45 | + splitToken: function |
| 46 | + splitTokens: function |
| 47 | + stringifyTokenStyle: function |
| 48 | + toArray: function |
| 49 | + tokenizeAnsiWithTheme: function |
| 50 | + tokenizeWithTheme: function |
| 51 | + tokensToHast: function |
| 52 | + transformerDecorations: function |
| 53 | + warnDeprecated: function |
| 54 | + ./textmate: |
| 55 | + disposeOnigString: function |
| 56 | + EncodedTokenMetadata: function |
| 57 | + FindOption: object |
| 58 | + FontStyle: object |
| 59 | + INITIAL: object |
| 60 | + Registry: function |
| 61 | + Theme: function |
| 62 | + " |
| 63 | + `) |
| 64 | +}) |
0 commit comments