11import { describe , it , expect } from 'vitest' ;
22import { Registry , REGISTRY } from '../src/registry.js' ;
3- import { SLACK , DISCORD , GITHUB , DROPBOX , LINEAR } from '../src/services/index.js' ;
3+ import { SLACK , DISCORD , GITHUB , DROPBOX , LINEAR , NOTION } from '../src/services/index.js' ;
44
55describe ( 'Registry' , ( ) => {
66 describe ( 'getByName' , ( ) => {
@@ -24,6 +24,10 @@ describe('Registry', () => {
2424 expect ( REGISTRY . getByName ( 'linear' ) ) . toBe ( LINEAR ) ;
2525 } ) ;
2626
27+ it ( 'should find Notion by name' , ( ) => {
28+ expect ( REGISTRY . getByName ( 'notion' ) ) . toBe ( NOTION ) ;
29+ } ) ;
30+
2731 it ( 'should return null for unknown service' , ( ) => {
2832 expect ( REGISTRY . getByName ( 'unknown' ) ) . toBeNull ( ) ;
2933 } ) ;
@@ -62,6 +66,10 @@ describe('Registry', () => {
6266 expect ( REGISTRY . getByUrl ( 'https://api.linear.app/graphql' ) ) . toBe ( LINEAR ) ;
6367 } ) ;
6468
69+ it ( 'should find Notion by API URL' , ( ) => {
70+ expect ( REGISTRY . getByUrl ( 'https://api.notion.com/v1/users/me' ) ) . toBe ( NOTION ) ;
71+ } ) ;
72+
6573 it ( 'should return null for unknown URL' , ( ) => {
6674 expect ( REGISTRY . getByUrl ( 'https://example.com/api' ) ) . toBeNull ( ) ;
6775 expect ( REGISTRY . getByUrl ( 'https://google.com' ) ) . toBeNull ( ) ;
0 commit comments