Skip to content

Commit

Permalink
Merge pull request #1147 from webrtcHacks/fix-chai
Browse files Browse the repository at this point in the history
update test setup and bring back chai as a dependency
  • Loading branch information
fippo authored Mar 24, 2024
2 parents 4c679c9 + 48dd891 commit 5f90e25
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
- browser: firefox
version: nightly
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install
- run: Xvfb :99 &
- name: e2e-tests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-and-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install
- run: npm run lint-and-unit-tests
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@puppeteer/browsers": "^1.4.1",
"babel-preset-env": "^1.7.0",
"brfs": "^1.5.0",
"chai": "^3.5.0",
"eslint-plugin-jest": "^27.4.0",
"grunt": "^1.1.0",
"grunt-babel": "^8.0.0",
Expand Down
13 changes: 7 additions & 6 deletions test/e2e/maxMessageSize.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ describe('maxMessageSize', () => {

function patchMaxMessageSizeFactory(maxMessageSize) {
return ((description) => {
description.sdp = description.sdp.replace(
/^a=max-message-size:\s*(\d+)\s*$/gm, '');
description.sdp = description.sdp.replace(
/(^m=application\s+\d+\s+[\w/]*SCTP.*$)/m,
'$1\r\na=max-message-size:' + maxMessageSize);
return description;
return {
type: description.type,
sdp: description.sdp
.replace(/^a=max-message-size:\s*(\d+)\s*$/gm, '')
.replace(/(^m=application\s+\d+\s+[\w/]*SCTP.*$)/m,
'$1\r\na=max-message-size:' + maxMessageSize),
};
});
}

Expand Down

0 comments on commit 5f90e25

Please sign in to comment.