From 33d64b240e12c2df49c96c1338cd26f16be9e382 Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Fri, 10 Jul 2026 23:44:54 +0000 Subject: [PATCH] test: Add atproto identifier --- src/backend/tests/atproto/atproto.test.ts | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/backend/tests/atproto/atproto.test.ts diff --git a/src/backend/tests/atproto/atproto.test.ts b/src/backend/tests/atproto/atproto.test.ts new file mode 100644 index 00000000..23b58675 --- /dev/null +++ b/src/backend/tests/atproto/atproto.test.ts @@ -0,0 +1,29 @@ +import chai from 'chai'; +import asPromised from 'chai-as-promised'; +import { describe, it } from 'mocha'; +import { getATProtoIdentifier } from '../../common/vendor/atproto/atUtils.ts'; + + +chai.use(asPromised); + +describe('Identifier Resolving', function () { + + // before(function () { + // if (process.env.ATPROTO_TEST !== 'true') { + // this.skip(); + // } + // }); + + it('should resolve known identifier', async function () { + await getATProtoIdentifier({identifier: 'foxxmd.dev'}).should.be.fulfilled + }); + + it('should not resolve bad identifier', async function () { + await getATProtoIdentifier({identifier: 'foxxmd.devnotreal'}).should.be.rejected + }); + + it('should resolve this identifier', async function () { + await getATProtoIdentifier({identifier: 'eroc1990.bsky.parastor.net'}).should.be.fulfilled + }); + +}); \ No newline at end of file -- 2.51.2