Skip to content

Commit

Permalink
chore: run linting and prettier on updated codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Kajlid committed Jun 27, 2024
1 parent 9db73ad commit e127e8f
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/manifests/utils/configs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,16 @@ describe('configs', () => {
describe('not in stateful mode', () => {
let nonStatefulConfig;
beforeAll(() => {
delete process.env.STATEFUL; // Ensure STATEFUL is not set
delete process.env.STATEFUL; // Ensure STATEFUL is not set
nonStatefulConfig = require('./configs');
});

it('should handle DASH mode without stateful', () => {
// Arrange
const configs = nonStatefulConfig.corruptorConfigUtils(
new URLSearchParams('statusCode=[{rsq:15,code:400}]&throttle=[{sq:15,rate:1000}]')
new URLSearchParams(
'statusCode=[{rsq:15,code:400}]&throttle=[{sq:15,rate:1000}]'
)
);

configs.register(statusCodeConfig).register(throttleConfig);
Expand All @@ -280,15 +282,18 @@ describe('configs', () => {
// Assert
expect(err).toEqual({
status: 400,
message: 'Relative sequence numbers on DASH are only supported when proxy is running in stateful mode'
message:
'Relative sequence numbers on DASH are only supported when proxy is running in stateful mode'
});
expect(actual).toBeNull();
});

it('should handle HLS mode without stateful', () => {
// Arrange
const configs = nonStatefulConfig.corruptorConfigUtils(
new URLSearchParams('statusCode=[{rsq:15,code:400}]&throttle=[{sq:15,rate:1000}]')
new URLSearchParams(
'statusCode=[{rsq:15,code:400}]&throttle=[{sq:15,rate:1000}]'
)
);

configs.register(statusCodeConfig).register(throttleConfig);
Expand All @@ -300,7 +305,8 @@ describe('configs', () => {
// Assert
expect(err).toEqual({
status: 400,
message: 'Relative sequence numbers on HLS are only supported when proxy is running in stateful mode'
message:
'Relative sequence numbers on HLS are only supported when proxy is running in stateful mode'
});
expect(actual).toBeNull();
});
Expand Down

0 comments on commit e127e8f

Please sign in to comment.