25 lines
837 B
TypeScript
25 lines
837 B
TypeScript
|
import { expect, expectAsync, tap } from '@push.rocks/tapbundle';
|
||
|
import * as qenv from '@push.rocks/qenv';
|
||
|
const testQenv = new qenv.Qenv('./', './.nogit/');
|
||
|
|
||
|
import * as smartexpose from '../ts/index.js'
|
||
|
|
||
|
let testSmartexpose: smartexpose.SmartExpose;
|
||
|
|
||
|
tap.test('should create a valid instance of smartexpose using Webdav', async () => {
|
||
|
testSmartexpose = await smartexpose.SmartExpose.createWithWebdav({
|
||
|
webdavCredentials: {
|
||
|
serverUrl: await testQenv.getEnvVarOnDemand('WEBDAV_SERVER_URL'),
|
||
|
password: await testQenv.getEnvVarOnDemand('WEBDAV_PASSWORD'),
|
||
|
},
|
||
|
exposedBaseUrl: await testQenv.getEnvVarOnDemand('WEBDAV_EXPOSED_BASE_URL'),
|
||
|
webdavSubPath: await testQenv.getEnvVarOnDemand('WEBDAV_SUB_PATH'),
|
||
|
exposeOptions: {
|
||
|
deleteAfterMillis: 30000,
|
||
|
privateUrl: true,
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
|
||
|
tap.start()
|