remove deprecated url

This commit is contained in:
Girish Ramakrishnan
2026-03-10 15:15:10 +05:30
parent 4209e4d90d
commit d377d1e1cf
4 changed files with 8 additions and 14 deletions
+5 -6
View File
@@ -3,7 +3,6 @@ import constants from '../../constants.js';
import common from './common.js';
import assert from 'node:assert/strict';
import superagent from '@cloudron/superagent';
import url from 'node:url';
describe('Cloudron', function () {
@@ -65,7 +64,7 @@ describe('Cloudron', function () {
const response3 = await superagent.post(`${serverUrl}/api/v1/auth/setup_account`)
.send({
inviteToken: url.parse(response2.body.inviteLink, true).query.inviteToken,
inviteToken: new URL(response2.body.inviteLink).searchParams.get('inviteToken'),
password, username, displayName
})
.ok(() => true);
@@ -104,7 +103,7 @@ describe('Cloudron', function () {
const response3 = await superagent.post(`${serverUrl}/api/v1/auth/setup_account`)
.send({
inviteToken: url.parse(response2.body.inviteLink, true).query.inviteToken,
inviteToken: new URL(response2.body.inviteLink).searchParams.get('inviteToken'),
password,
username: 'setupuser2', // this will cause a conflict. cannot change username
displayName
@@ -114,7 +113,7 @@ describe('Cloudron', function () {
const response4 = await superagent.post(`${serverUrl}/api/v1/auth/setup_account`)
.send({
inviteToken: url.parse(response2.body.inviteLink, true).query.inviteToken,
inviteToken: new URL(response2.body.inviteLink).searchParams.get('inviteToken'),
password,
displayName
})
@@ -158,7 +157,7 @@ describe('Cloudron', function () {
let response3 = await superagent.post(`${serverUrl}/api/v1/auth/setup_account`)
.send({
inviteToken: url.parse(response2.body.inviteLink, true).query.inviteToken,
inviteToken: new URL(response2.body.inviteLink).searchParams.get('inviteToken'),
password,
username, // cannot set username when profile is locked
})
@@ -167,7 +166,7 @@ describe('Cloudron', function () {
response3 = await superagent.post(`${serverUrl}/api/v1/auth/setup_account`)
.send({
inviteToken: url.parse(response2.body.inviteLink, true).query.inviteToken,
inviteToken: new URL(response2.body.inviteLink).searchParams.get('inviteToken'),
password,
})
.ok(() => true);