provider.test.js 723 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
const PAGE_PATH =
  "/pages/API/provider/provider";

describe("provider", () => {
  if (process.env.uniTestPlatformInfo.indexOf('web') > -1 || process.env.UNI_AUTOMATOR_APP_WEBVIEW === 'true') {
    it('web', () => {
      expect(1).toBe(1)
    })
    return
  }
  beforeAll(async () => {
    page = await program.reLaunch(PAGE_PATH)
    await page.waitFor(600)
  });
  it("test getprovider", async () => {
    await page.callMethod('getProvider');
    await page.waitFor(1000);
    let providerIds = await page.data('providerIds')

    expect(providerIds[0]).toEqual('wxpay')
    expect(providerIds[1]).toEqual('alipay')
    expect(providerIds[2]).toEqual('system')
    expect(providerIds[3]).toEqual('tencent')
  });
});