Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/test/plugin.test.ts
2020-11-06 10:12:46 -05:00

35 lines
858 B
TypeScript

import { logger } from "@coder/logger"
import * as assert from "assert"
import { describe } from "mocha"
import * as path from "path"
import { PluginAPI } from "../src/node/plugin"
/**
* Use $LOG_LEVEL=debug to see debug logs.
*/
describe("plugin", () => {
it("loads", async () => {
const papi = new PluginAPI(logger, path.resolve(__dirname, "test-plugin") + ":meow")
await papi.loadPlugins()
const apps = await papi.applications()
assert.deepEqual(
[
{
name: "goland",
version: "4.0.0",
iconPath: "/icon.svg",
plugin: {
name: "test-plugin",
version: "1.0.0",
description: "Fake plugin for testing code-server's plugin API",
modulePath: path.join(__dirname, "test-plugin"),
},
},
],
apps,
)
})
})