Skip to content

Commit

Permalink
Fix import path in test of plugin
Browse files Browse the repository at this point in the history
Jest will test sources directly. A root entrypoint of plugin interface
is depending on the build output so Jest may fail to test if run before
build.
  • Loading branch information
yhatt committed Sep 9, 2022
1 parent 8545847 commit a581022
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/plugin.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import markdownIt from 'markdown-it'
import pluginAsDefaultExport from '../plugin'
import { marpitPlugin } from '../plugin'
import pluginAsDefaultExport from '../src/plugin'
import { marpitPlugin } from '../src/plugin'
import { Marpit } from '../src/index'

describe('Plugin interface', () => {
it('is compatible as CommonJS module', () => {
expect(require('../plugin')).toBeInstanceOf(Function)
expect(require('../src/plugin')).toBeInstanceOf(Function)
})

it('is compatible as ES Modules and able to use through default export', () => {
Expand Down

0 comments on commit a581022

Please sign in to comment.