Sfoglia il codice sorgente

Fix tests

tags/v5.1.0
Chocobozzz 2 mesi fa
parent
commit
2dbcc3741b
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: 583A612D890159BE
2 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. +1
    -1
      server/tests/fixtures/peertube-plugin-test/main.js
  2. +3
    -1
      server/tests/plugins/filter-hooks.ts

+ 1
- 1
server/tests/fixtures/peertube-plugin-test/main.js Vedi File

@@ -209,7 +209,7 @@ async function register ({ registerHook, registerSetting, settingsManager, stora

registerHook({
target: 'filter:activity-pub.activity.context.build.result',
handler: context => context.concat([ 'https://example.com/new-context' ])
handler: context => context.concat([ { recordedAt: 'https://schema.org/recordedAt' } ])
})

registerHook({


+ 3
- 1
server/tests/plugins/filter-hooks.ts Vedi File

@@ -853,7 +853,9 @@ describe('Test plugin filter hooks', function () {
const { body } = await makeActivityPubGetRequest(servers[0].url, '/w/' + videoUUID)
expect(body.type).to.equal('Video')

expect(body['@context'].some(c => c === 'https://example.com/new-context')).to.be.true
expect(body['@context'].some(c => {
return typeof c === 'object' && c.recordedAt === 'https://schema.org/recordedAt'
})).to.be.true
})

it('Should run filter:activity-pub.video.json-ld.build.result', async function () {


Loading…
Annulla
Salva