18 lines
538 B
JavaScript
18 lines
538 B
JavaScript
import { describe, it } from 'vitest'
|
|
import { describePluginTests } from '@takerofnotes/plugin-sdk'
|
|
import plugin from './src/index.js'
|
|
import path from 'path'
|
|
import { fileURLToPath } from 'url'
|
|
import fs from 'fs'
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
const testDir = path.join(__dirname, 'test-notes')
|
|
|
|
if (!fs.existsSync(testDir)) {
|
|
fs.mkdirSync(testDir, { recursive: true })
|
|
}
|
|
|
|
const adapter = plugin.createAdapter({ notesDir: testDir })
|
|
|
|
describePluginTests({ plugin, adapter }, describe, it, expect)
|