mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: InAppPurchase pre-emptive deallocation (#40957)
* fix: InAppPurchase pre-emptive deallocation Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * test: try re-enabling IAP tests Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { expect } from 'chai';
|
||||
import { inAppPurchase } from 'electron/main';
|
||||
import { ifdescribe } from './lib/spec-helpers';
|
||||
|
||||
describe('inAppPurchase module', function () {
|
||||
if (process.platform !== 'darwin') return;
|
||||
@@ -33,11 +34,9 @@ describe('inAppPurchase module', function () {
|
||||
expect(inAppPurchase.getReceiptURL()).to.match(/_MASReceipt\/receipt$/);
|
||||
});
|
||||
|
||||
// The following three tests are disabled because they hit Apple servers, and
|
||||
// Apple started blocking requests from AWS IPs (we think), so they fail on CI.
|
||||
// TODO: find a way to mock out the server requests so we can test these APIs
|
||||
// without relying on a remote service.
|
||||
xdescribe('handles product purchases', () => {
|
||||
// This fails on x64 in CI - likely owing to some weirdness with the machines.
|
||||
// We should look into fixing it there but at least run it on arm6 machines.
|
||||
ifdescribe(process.arch !== 'x64')('handles product purchases', () => {
|
||||
it('purchaseProduct() fails when buying invalid product', async () => {
|
||||
const success = await inAppPurchase.purchaseProduct('non-exist');
|
||||
expect(success).to.be.false('failed to purchase non-existent product');
|
||||
|
||||
Reference in New Issue
Block a user