Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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() { }
}
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() { }
}
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() { }
}
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() { }
}
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() { }
}