/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
-import * as chai from 'chai'
+import { expect } from 'chai'
import { snakeCase } from 'lodash'
import validator from 'validator'
-import { getAverageBitrate, getMaxBitrate } from '@shared/core-utils'
+import { getAverageTheoreticalBitrate, getMaxTheoreticalBitrate } from '@shared/core-utils'
import { VideoResolution } from '@shared/models'
import { objectConverter, parseBytes, parseDurationToMs } from '../../helpers/core-utils'
-const expect = chai.expect
-
describe('Parse Bytes', function () {
it('Should pass on valid value', async function () {
]
for (const test of tests) {
- expect(getMaxBitrate(test)).to.be.above(test.min * 1000).and.below(test.max * 1000)
+ expect(getMaxTheoreticalBitrate(test)).to.be.above(test.min * 1000).and.below(test.max * 1000)
}
})
]
for (const test of tests) {
- expect(getAverageBitrate(test)).to.be.above(test.min * 1000).and.below(test.max * 1000)
+ expect(getAverageTheoreticalBitrate(test)).to.be.above(test.min * 1000).and.below(test.max * 1000)
}
})
})