diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-27 14:32:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-27 15:12:22 +0200 |
commit | 41fb13c330de629df2d23379209e79c7af0f2e9a (patch) | |
tree | 73bc5a90566406b3910f142beae2a879c1e4265d /server/tests | |
parent | 40e7ed0714f96c01e16de3ac971a4b28116294e1 (diff) | |
download | PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.tar.gz PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.tar.zst PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.zip |
esModuleInterop to true
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/redundancy/redundancy.ts | 2 | ||||
-rw-r--r-- | server/tests/api/server/no-client.ts | 2 | ||||
-rw-r--r-- | server/tests/api/server/tracker.ts | 4 | ||||
-rw-r--r-- | server/tests/api/videos/multiple-servers.ts | 2 | ||||
-rw-r--r-- | server/tests/feeds/feeds.ts | 6 |
5 files changed, 8 insertions, 8 deletions
diff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.ts index fe42e5fa8..86b40cfe6 100644 --- a/server/tests/api/redundancy/redundancy.ts +++ b/server/tests/api/redundancy/redundancy.ts | |||
@@ -3,7 +3,7 @@ | |||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { readdir } from 'fs-extra' | 5 | import { readdir } from 'fs-extra' |
6 | import * as magnetUtil from 'magnet-uri' | 6 | import magnetUtil from 'magnet-uri' |
7 | import { basename, join } from 'path' | 7 | import { basename, join } from 'path' |
8 | import { | 8 | import { |
9 | checkSegmentHash, | 9 | checkSegmentHash, |
diff --git a/server/tests/api/server/no-client.ts b/server/tests/api/server/no-client.ts index 719813ae9..1e0c95a3b 100644 --- a/server/tests/api/server/no-client.ts +++ b/server/tests/api/server/no-client.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import 'mocha' | 1 | import 'mocha' |
2 | import * as request from 'supertest' | 2 | import request from 'supertest' |
3 | import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/extra-utils' | 3 | import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/extra-utils' |
4 | import { HttpStatusCode } from '@shared/models' | 4 | import { HttpStatusCode } from '@shared/models' |
5 | 5 | ||
diff --git a/server/tests/api/server/tracker.ts b/server/tests/api/server/tracker.ts index f597ac60c..30a9618b3 100644 --- a/server/tests/api/server/tracker.ts +++ b/server/tests/api/server/tracker.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await,@typescript-eslint/no-floating-promises */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await,@typescript-eslint/no-floating-promises */ |
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as magnetUtil from 'magnet-uri' | 4 | import magnetUtil from 'magnet-uri' |
5 | import * as WebTorrent from 'webtorrent' | 5 | import WebTorrent from 'webtorrent' |
6 | import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils' | 6 | import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers } from '@shared/extra-utils' |
7 | 7 | ||
8 | describe('Test tracker', function () { | 8 | describe('Test tracker', function () { |
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts index f9220e4b3..df9deb1e1 100644 --- a/server/tests/api/videos/multiple-servers.ts +++ b/server/tests/api/videos/multiple-servers.ts | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import * as request from 'supertest' | 5 | import request from 'supertest' |
6 | import { | 6 | import { |
7 | buildAbsoluteFixturePath, | 7 | buildAbsoluteFixturePath, |
8 | checkTmpIsEmpty, | 8 | checkTmpIsEmpty, |
diff --git a/server/tests/feeds/feeds.ts b/server/tests/feeds/feeds.ts index 55b434846..a1c976fd3 100644 --- a/server/tests/feeds/feeds.ts +++ b/server/tests/feeds/feeds.ts | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import * as xmlParser from 'fast-xml-parser' | 5 | import { parse, validate } from 'fast-xml-parser' |
6 | import { | 6 | import { |
7 | cleanupTests, | 7 | cleanupTests, |
8 | createMultipleServers, | 8 | createMultipleServers, |
@@ -149,9 +149,9 @@ describe('Test syndication feeds', () => { | |||
149 | it('Should contain a valid enclosure (covers RSS 2.0 endpoint)', async function () { | 149 | it('Should contain a valid enclosure (covers RSS 2.0 endpoint)', async function () { |
150 | for (const server of servers) { | 150 | for (const server of servers) { |
151 | const rss = await server.feed.getXML({ feed: 'videos' }) | 151 | const rss = await server.feed.getXML({ feed: 'videos' }) |
152 | expect(xmlParser.validate(rss)).to.be.true | 152 | expect(validate(rss)).to.be.true |
153 | 153 | ||
154 | const xmlDoc = xmlParser.parse(rss, { parseAttributeValue: true, ignoreAttributes: false }) | 154 | const xmlDoc = parse(rss, { parseAttributeValue: true, ignoreAttributes: false }) |
155 | 155 | ||
156 | const enclosure = xmlDoc.rss.channel.item[0].enclosure | 156 | const enclosure = xmlDoc.rss.channel.item[0].enclosure |
157 | expect(enclosure).to.exist | 157 | expect(enclosure).to.exist |