From 7c0aba166b84297cc1ddfa43f142d17f1ccb6630 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Sun, 25 Oct 2020 01:54:37 +0200 Subject: [PATCH] Add XMPP test for verify --- test/verify.test.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/verify.test.js b/test/verify.test.js index 7b3cb9c..22797c0 100644 --- a/test/verify.test.js +++ b/test/verify.test.js @@ -83,4 +83,11 @@ describe('verify', () => { expect(matches[0].serviceprovider.name).to.be.equal('hackernews') expect(matches[0]).to.matchPattern(pattern) }) + it('should match "https://lobste.rs/u/Alice" to the Lobsters service provider', async () => { + const matches = await doipjs.verify('https://lobste.rs/u/Alice', null, {returnMatchesOnly: true}) + expect(matches).to.be.a('array') + expect(matches).to.be.length(1) + expect(matches[0].serviceprovider.name).to.be.equal('lobsters') + expect(matches[0]).to.matchPattern(pattern) + }) })