aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/helpers/core-utils.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-05-05 10:53:04 +0200
committerChocobozzz <chocobozzz@cpy.re>2023-05-09 08:57:34 +0200
commite7d8e2b245491c0a8e008fb570037506d729ff04 (patch)
treed850a7f82cc02946f2e87b306d0b281cef5eb73d /server/tests/helpers/core-utils.ts
parentdd3f99434cc3cb7226d33ffcd888c91d0ce150a9 (diff)
downloadPeerTube-e7d8e2b245491c0a8e008fb570037506d729ff04.tar.gz
PeerTube-e7d8e2b245491c0a8e008fb570037506d729ff04.tar.zst
PeerTube-e7d8e2b245491c0a8e008fb570037506d729ff04.zip
Fix audio transcoding copy
Diffstat (limited to 'server/tests/helpers/core-utils.ts')
-rw-r--r--server/tests/helpers/core-utils.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/tests/helpers/core-utils.ts b/server/tests/helpers/core-utils.ts
index de6ba4f82..cd2f07e4a 100644
--- a/server/tests/helpers/core-utils.ts
+++ b/server/tests/helpers/core-utils.ts
@@ -3,7 +3,7 @@
3import { expect } from 'chai' 3import { expect } from 'chai'
4import { snakeCase } from 'lodash' 4import { snakeCase } from 'lodash'
5import validator from 'validator' 5import validator from 'validator'
6import { getAverageBitrate, getMaxBitrate } from '@shared/core-utils' 6import { getAverageTheoreticalBitrate, getMaxTheoreticalBitrate } from '@shared/core-utils'
7import { VideoResolution } from '@shared/models' 7import { VideoResolution } from '@shared/models'
8import { objectConverter, parseBytes, parseDurationToMs } from '../../helpers/core-utils' 8import { objectConverter, parseBytes, parseDurationToMs } from '../../helpers/core-utils'
9 9
@@ -128,7 +128,7 @@ describe('Bitrate', function () {
128 ] 128 ]
129 129
130 for (const test of tests) { 130 for (const test of tests) {
131 expect(getMaxBitrate(test)).to.be.above(test.min * 1000).and.below(test.max * 1000) 131 expect(getMaxTheoreticalBitrate(test)).to.be.above(test.min * 1000).and.below(test.max * 1000)
132 } 132 }
133 }) 133 })
134 134
@@ -144,7 +144,7 @@ describe('Bitrate', function () {
144 ] 144 ]
145 145
146 for (const test of tests) { 146 for (const test of tests) {
147 expect(getAverageBitrate(test)).to.be.above(test.min * 1000).and.below(test.max * 1000) 147 expect(getAverageTheoreticalBitrate(test)).to.be.above(test.min * 1000).and.below(test.max * 1000)
148 } 148 }
149 }) 149 })
150}) 150})