Skip to content

Commit

Permalink
Bump dependency and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jondubois committed Sep 23, 2023
1 parent 406b325 commit b3562e8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"async-stream-emitter": "^6.0.1",
"buffer": "^5.2.1",
"clone-deep": "^4.0.1",
"linked-list": "^0.1.0",
"linked-list": "^2.1.0",
"sc-errors": "^2.0.3",
"sc-formatter": "^4.0.0",
"stream-demux": "^9.0.2",
Expand Down
20 changes: 14 additions & 6 deletions test/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ let validSignedAuthTokenBob = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFt
let validSignedAuthTokenKate = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImthdGUiLCJleHAiOjMxNjM3NTg5NzgyMTU0ODcsImlhdCI6MTUwMjc0Nzc5NX0.Yfb63XvDt9Wk0wHSDJ3t7Qb1F0oUVUaM5_JKxIE2kyw';
let invalidSignedAuthToken = 'fakebGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.fakec2VybmFtZSI6ImJvYiIsImlhdCI6MTUwMjYyNTIxMywiZXhwIjoxNTAyNzExNjEzfQ.fakemYcOOjM9bzmS4UYRvlWSk_lm3WGHvclmFjLbyOk';

let authTokenName = 'socketcluster.authToken';

const TOKEN_EXPIRY_IN_SECONDS = 60 * 60 * 24 * 366 * 5000;

function wait(duration) {
Expand Down Expand Up @@ -84,7 +86,8 @@ describe('Integration tests', function () {
clientOptions = {
hostname: '127.0.0.1',
port: PORT_NUMBER,
ackTimeout: 200
ackTimeout: 200,
authTokenName
};

await server.listener('ready').once();
Expand Down Expand Up @@ -119,7 +122,8 @@ describe('Integration tests', function () {
it('Should automatically connect socket on creation by default', async function () {
clientOptions = {
hostname: '127.0.0.1',
port: PORT_NUMBER
port: PORT_NUMBER,
authTokenName
};

client = socketClusterClient.create(clientOptions);
Expand All @@ -131,7 +135,8 @@ describe('Integration tests', function () {
clientOptions = {
hostname: '127.0.0.1',
port: PORT_NUMBER,
autoConnect: false
autoConnect: false,
authTokenName
};

client = socketClusterClient.create(clientOptions);
Expand Down Expand Up @@ -265,7 +270,8 @@ describe('Integration tests', function () {

client = socketClusterClient.create({
hostname: clientOptions.hostname,
port: port
port: port,
authTokenName
});

await client.listener('connect').once();
Expand Down Expand Up @@ -299,7 +305,8 @@ describe('Integration tests', function () {

client = socketClusterClient.create({
hostname: clientOptions.hostname,
port: port
port: port,
authTokenName
});

await client.listener('connect').once();
Expand Down Expand Up @@ -333,7 +340,8 @@ describe('Integration tests', function () {

client = socketClusterClient.create({
hostname: clientOptions.hostname,
port: port
port: port,
authTokenName
});

await client.listener('connect').once();
Expand Down

0 comments on commit b3562e8

Please sign in to comment.