How to use the alsatian.AsyncTest function in alsatian

To help you get started, we’ve selected a few alsatian examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nozzlegear / Shopify-Prime / tests / application_credits.ts View on Github external
TestFixture,
    Timeout
    } from 'alsatian';
import { Config, Expect } from './test_utils';

@TestFixture("Application Credits")
export class ApplicationCreditTests {
    @AsyncTest("Creates an application credit")
    @IgnoreTest("Cannot be tested with a private app.")
    public async Test1() { }

    @AsyncTest("Gets an application credit")
    @IgnoreTest("Cannot be tested with a private app.")
    public async Test2() { }

    @AsyncTest("Lists application credits")
    @IgnoreTest("Cannot be tested with a private app.")
    public async Test3() { }
}
github nozzlegear / Shopify-Prime / tests / shops.ts View on Github external
Expect(shop.force_ssl).toBeType("boolean");
        Expect(shop.shop_owner).toBeType("string");
        Expect(shop.myshopify_domain).toBeType("string");
    }

    @AsyncTest("should get a shop with only a name field")
    @Timeout(5000)
    public async Test2() {
        const shop = await this.service.get({ fields: "name" });

        Expect(shop).not.toBeNull();
        Expect(Object.getOwnPropertyNames(shop).length).toEqual(1);
        Expect(shop.name).toBeType("string");
    }

    @AsyncTest("should force uninstall the app") 
    @IgnoreTest("cannot be tested with a private app")
    public async Test3() { }
}
github nozzlegear / Shopify-Prime / tests / charges.ts View on Github external
TestFixture,
    Timeout
    } from 'alsatian';
import { Config, Expect } from './test_utils';

@TestFixture("Charge Tests")
export class ChargeTests {
    @AsyncTest("should list charges,")
    @IgnoreTest("Cannot be tested with a private app.")
    public async Test1() { }

    @AsyncTest("should get a charge")
    @IgnoreTest("Cannot be tested with a private app.")
    public async Test2() { }

    @AsyncTest("should create a charge")
    @IgnoreTest("Cannot be tested with a private app.")
    public async Test3() { }

    @AsyncTest("should activate a charge")
    @IgnoreTest("Cannot be tested with a private app.")
    public async Test4() { }
}
github nozzlegear / Shopify-Prime / tests / discounts.ts View on Github external
TestFixture,
    Timeout
    } from 'alsatian';
import { Config, Expect } from './test_utils';

@TestFixture("Discount Tests")
export class DiscountTests {
    @AsyncTest("should create a Discount")
    @IgnoreTest("cannot be tested without a Shopify Plus account.")
    public async Test1() { }

    @AsyncTest("should get a Discount")
    @IgnoreTest("cannot be tested without a Shopify Plus account.")
    public async Test2() { }

    @AsyncTest("should list Discounts,")
    @IgnoreTest("annot be tested without a Shopify Plus account.")
    public async Test3() { }

    @AsyncTest("should delete a Discount")
    @IgnoreTest("cannot be tested without a Shopify Plus account.")
    public async Test4() { }

    @AsyncTest("should enable a Discount")
    @IgnoreTest("cannot be tested without a Shopify Plus account.")
    public async Test5() { }

    @AsyncTest("should disable a Discount")
    @IgnoreTest("cannot be tested without a Shopify Plus account.")
    public async Test6() { }
}
github nozzlegear / Shopify-Prime / tests / usage_charges.ts View on Github external
TestFixture,
    Timeout
    } from 'alsatian';
import { Config, Expect } from './test_utils';

@TestFixture("UsageCharge Tests")
export class UsageChargeTests {
    @AsyncTest("should list charges,")
    @IgnoreTest("cannot be tested with a private app.")
    public async Test1() { }

    @AsyncTest("should get a charge")
    @IgnoreTest("cannot be tested with a private app.")
    public async Test2() { }

    @AsyncTest("should create a charge")
    @IgnoreTest("cannot be tested with a private app.")
    public async Test3() { }
}

alsatian

TypeScript and JavaScript testing framework for beautiful and readable tests

MIT
Latest version published 4 years ago

Package Health Score

47 / 100
Full package analysis