fix(start supporting workers again): update
This commit is contained in:
18
test/test.ts
18
test/test.ts
@ -14,18 +14,23 @@ tap.test('should create a valid instance of CloudflareAccount', async () => {
|
||||
testCloudflareAccount = new cloudflare.CloudflareAccount(await testQenv.getEnvVarOnDemand('CF_KEY'));
|
||||
});
|
||||
|
||||
tap.test('should preselect an account', async () => {
|
||||
await testCloudflareAccount.preselectAccountByName('Sandbox Account');
|
||||
})
|
||||
|
||||
tap.test('.listZones() -> should display an entire account', async (tools) => {
|
||||
tools.timeout(600000);
|
||||
const result = await testCloudflareAccount.convenience.listZones();
|
||||
console.log(result);
|
||||
await tools.delayFor(10000);
|
||||
// await tools.delayFor(10000);
|
||||
});
|
||||
|
||||
tap.test(
|
||||
'.getZoneId(domainName) -> should get an Cloudflare Id for a domain string',
|
||||
async (tools) => {
|
||||
tools.timeout(600000);
|
||||
await testCloudflareAccount.convenience.getZoneId('bleu.de');
|
||||
const id = await testCloudflareAccount.convenience.getZoneId('bleu.de');
|
||||
console.log(`The account id for bleu.de is: ${id}`);
|
||||
}
|
||||
);
|
||||
|
||||
@ -71,6 +76,11 @@ tap.test('.purge(some.domain) -> should purge everything', async () => {
|
||||
await testCloudflareAccount.convenience.purgeZone('bleu.de');
|
||||
});
|
||||
|
||||
tap.test('should list workers', async () => {
|
||||
const workerArray = await testCloudflareAccount.workerManager.listWorkerScripts();
|
||||
console.log(workerArray);
|
||||
});
|
||||
|
||||
// WORKERS
|
||||
tap.test('should create a worker', async () => {
|
||||
const worker = await testCloudflareAccount.workerManager.createWorker(
|
||||
@ -86,8 +96,8 @@ tap.test('should create a worker', async () => {
|
||||
console.log(worker);
|
||||
});
|
||||
|
||||
tap.test('should get workers', async () => {
|
||||
const workerArray = await testCloudflareAccount.workerManager.listWorkers();
|
||||
tap.test('should get workers again', async () => {
|
||||
const workerArray = await testCloudflareAccount.workerManager.listWorkerScripts();
|
||||
console.log(workerArray);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user