mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 22:49:28 -07:00
Change name depending on url in claim, remove references to existing profile, and add another test
This commit is contained in:
parent
ff51fa47e6
commit
907f196446
1 changed files with 14 additions and 10 deletions
|
@ -18,7 +18,7 @@ limitations under the License.
|
||||||
* @module serviceProviders/pronounspage
|
* @module serviceProviders/pronounspage
|
||||||
* @example
|
* @example
|
||||||
* import { ServiceProviderDefinitions } from 'doipjs';
|
* import { ServiceProviderDefinitions } from 'doipjs';
|
||||||
* const sp = ServiceProviderDefinitions.data.pronounspage.processURI('https://pronouns.page/@Alice');
|
* const sp = ServiceProviderDefinitions.data.pronounspage.processURI('https://pronouns.page/@doipjs');
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as E from '../enums.js'
|
import * as E from '../enums.js'
|
||||||
|
@ -45,7 +45,7 @@ export function processURI (uri) {
|
||||||
return new ServiceProvider({
|
return new ServiceProvider({
|
||||||
about: {
|
about: {
|
||||||
id: 'pronounspage',
|
id: 'pronounspage',
|
||||||
name: 'pronouns.page',
|
name: match[1],
|
||||||
homepage: 'https://pronouns.page'
|
homepage: 'https://pronouns.page'
|
||||||
},
|
},
|
||||||
profile: {
|
profile: {
|
||||||
|
@ -90,35 +90,39 @@ export function processURI (uri) {
|
||||||
|
|
||||||
export const tests = [
|
export const tests = [
|
||||||
{
|
{
|
||||||
uri: 'https://pronouns.page/@Alice',
|
uri: 'https://pronouns.page/@doipjs',
|
||||||
shouldMatch: true
|
shouldMatch: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uri: 'https://pronouns.page/@Alice#she/her',
|
uri: 'https://pronouns.page/@doipjs#it/its',
|
||||||
shouldMatch: true
|
shouldMatch: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uri: 'https://pronouns.page/u/Alice',
|
uri: 'https://pronouns.page/u/doipjs',
|
||||||
shouldMatch: true
|
shouldMatch: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uri: 'https://nl.pronouns.page/u/Alice',
|
uri: 'https://nl.pronouns.page/u/doipjs',
|
||||||
shouldMatch: true
|
shouldMatch: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uri: 'https://pronombr.es/@Alice',
|
uri: 'https://lad.pronouns.page/u/doipjs',
|
||||||
shouldMatch: true
|
shouldMatch: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uri: 'https://pronoms.fr/@Alice',
|
uri: 'https://pronombr.es/@doipjs',
|
||||||
shouldMatch: true
|
shouldMatch: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uri: 'https://zaimki.pl/@Alice',
|
uri: 'https://pronoms.fr/@doipjs',
|
||||||
shouldMatch: true
|
shouldMatch: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
uri: 'https://pronouns.page/Alice',
|
uri: 'https://zaimki.pl/@doipjs',
|
||||||
|
shouldMatch: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
uri: 'https://pronouns.page/doipjs',
|
||||||
shouldMatch: false
|
shouldMatch: false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue