]>
Commit | Line | Data |
---|---|---|
a2470c9f | 1 | import { expect } from 'chai' |
41fb13c3 | 2 | import request from 'supertest' |
c0e8b12e | 3 | import { HttpStatusCode } from '@shared/models' |
a2470c9f C |
4 | |
5 | async function testCaptionFile (url: string, captionPath: string, containsString: string) { | |
6 | const res = await request(url) | |
7 | .get(captionPath) | |
8 | .expect(HttpStatusCode.OK_200) | |
9 | ||
10 | expect(res.text).to.contain(containsString) | |
11 | } | |
12 | ||
13 | // --------------------------------------------------------------------------- | |
14 | ||
15 | export { | |
16 | testCaptionFile | |
17 | } |