fix(tests): Migrate tests to Deno native runner and update Deno config

This commit is contained in:
2025-10-26 17:44:43 +00:00
parent 536ebca6ab
commit 95c4ae3b16
6 changed files with 86 additions and 95 deletions

View File

@@ -1,10 +1,10 @@
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
import { tap, expect } from '@push.rocks/tapbundle';
// Disable TLS certificate validation for testing
Deno.env.set('NODE_TLS_REJECT_UNAUTHORIZED', '0');
import * as cloudlyConnectorMod from '../ts/connector.cloudly/cloudlyconnector.js';
import { CloudlyConnector } from '../ts/connector.cloudly/cloudlyconnector.ts';
tap.test('should be able to announce a container to cloudly', async () => {
const cloudlyConnector = new cloudlyConnectorMod.CloudlyConnector(null);
Deno.test('should be able to announce a container to cloudly', async () => {
const cloudlyConnector = new CloudlyConnector(null);
await cloudlyConnector.announceDockerContainer(
{
registryUrl: 'registry.losssless.com',
@@ -15,12 +15,3 @@ tap.test('should be able to announce a container to cloudly', async () => {
'cloudly.lossless.one'
);
});
tap.test('should close the program despite socket timeout', async (toolsArg) => {
// TODO: remove when unreffed timeouts in webrequest have been solved.
toolsArg.delayFor(0).then(() => {
process.exit();
});
});
tap.start();