-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve type safety and test coverage
n
n- Enhanced Notion serv…
…ice type definitions and standardization`n- Improved test coverage and configuration`n- Fixed page parent handling and search pagination`n- Removed outdated documentation`n`nThis is a patch release (1.0.1) focusing on type safety improvements and bug fixes.
- Loading branch information
Showing
13 changed files
with
435 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { describe, it, expect } from "@jest/globals"; | ||
import { serverConfig, serverCapabilities } from "../server-config.js"; | ||
|
||
describe("Server Configuration", () => { | ||
describe("serverConfig", () => { | ||
it("should have correct basic properties", () => { | ||
expect(serverConfig.name).toBe("systemprompt-mcp-notion"); | ||
expect(serverConfig.version).toBe("1.0.0"); | ||
}); | ||
|
||
it("should have correct metadata", () => { | ||
expect(serverConfig.metadata).toBeDefined(); | ||
expect(serverConfig.metadata.name).toBe( | ||
"System Prompt Notion Integration Server" | ||
); | ||
expect(serverConfig.metadata.icon).toBe("mdi:notion"); | ||
expect(serverConfig.metadata.color).toBe("black"); | ||
expect(typeof serverConfig.metadata.serverStartTime).toBe("number"); | ||
expect(serverConfig.metadata.environment).toBe(process.env.NODE_ENV); | ||
}); | ||
|
||
it("should have correct custom data", () => { | ||
expect(serverConfig.metadata.customData).toBeDefined(); | ||
expect(serverConfig.metadata.customData.serverFeatures).toEqual([ | ||
"notion-pages", | ||
"notion-databases", | ||
"notion-comments", | ||
]); | ||
expect(serverConfig.metadata.customData.supportedAPIs).toEqual([ | ||
"notion", | ||
]); | ||
expect(serverConfig.metadata.customData.authProvider).toBe("notion-api"); | ||
expect(serverConfig.metadata.customData.requiredCapabilities).toEqual([ | ||
"read_content", | ||
"update_content", | ||
"insert_content", | ||
"comment_access", | ||
]); | ||
}); | ||
}); | ||
|
||
describe("serverCapabilities", () => { | ||
it("should have correct capabilities structure", () => { | ||
expect(serverCapabilities.capabilities).toEqual({ | ||
resources: { | ||
listChanged: true, | ||
}, | ||
tools: {}, | ||
prompts: { | ||
listChanged: true, | ||
}, | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.