update to new sdk

This commit is contained in:
nicwands
2026-03-24 13:56:52 -04:00
parent 406f8ddb74
commit f1c19d453a
4 changed files with 14 additions and 31 deletions

View File

@@ -1,7 +1,6 @@
import { describe, it } from 'vitest'
import { runPluginTests } from '@takerofnotes/plugin-sdk'
import { describePluginTests } from '@takerofnotes/plugin-sdk'
import plugin from './src/index.js'
import FileSystemAdapter from './src/FileSystemAdapter.js'
import path from 'path'
import { fileURLToPath } from 'url'
import fs from 'fs'
@@ -13,33 +12,6 @@ if (!fs.existsSync(testDir)) {
fs.mkdirSync(testDir, { recursive: true })
}
const adapter = new FileSystemAdapter({ notesDir: testDir })
const tests = runPluginTests({ plugin, adapter })
const adapter = plugin.createAdapter({ notesDir: testDir })
describe('Plugin Validation', () => {
tests.validatePlugin(it, (a, b) => expect(a).toBe(b))
})
describe('Adapter: init()', () => {
tests.init(it)
})
describe('Adapter: getAll()', () => {
tests.getAll(it)
})
describe('Adapter: create()', () => {
tests.create(it)
})
describe('Adapter: update()', () => {
tests.update(it)
})
describe('Adapter: delete()', () => {
tests.delete(it)
})
describe('Full CRUD Cycle', () => {
tests.crudCycle(it)
})
describePluginTests({ plugin, adapter }, describe, it, expect)