Skip to content

Commit b827ceb

Browse files
authored
always kill sandbox process (#220)
* always kill sandbox process * after() -> after.always()
1 parent 91dec29 commit b827ceb

27 files changed

+27
-27
lines changed

examples/__tests__/test-clean-state.ava.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ test.beforeEach(async t => {
1919
};
2020
});
2121

22-
test.afterEach(async t => {
22+
test.afterEach.always(async t => {
2323
await t.context.worker.tearDown().catch(error => {
2424
console.log('Failed tear down the worker:', error);
2525
});

examples/__tests__/test-counter.ava.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test.beforeEach(async t => {
2626
});
2727

2828
// If the environment is reused, use test.after to replace test.afterEach
29-
test.afterEach(async t => {
29+
test.afterEach.always(async t => {
3030
await t.context.worker.tearDown().catch(error => {
3131
console.log('Failed to tear down the worker:', error);
3232
});

examples/__tests__/test-cross-contract-call.ava.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ test.beforeEach(async t => {
3636
};
3737
});
3838

39-
test.afterEach(async t => {
39+
test.afterEach.always(async t => {
4040
await t.context.worker.tearDown().catch(error => {
4141
console.log('Failed tear down the worker:', error);
4242
});

examples/__tests__/test-fungible-token-lockable.ava.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ test.beforeEach(async t => {
2525
t.context.accounts = { root, lockableFt, ali, bob };
2626
});
2727

28-
test.afterEach(async t => {
28+
test.afterEach.always(async t => {
2929
await t.context.worker.tearDown().catch(error => {
3030
console.log('Failed to tear down the worker:', error);
3131
});

examples/__tests__/test-fungible-token.ava.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test.beforeEach(async (t) => {
2828
t.context.accounts = { root, ft, ali, bob, xcc };
2929
});
3030

31-
test.afterEach(async t => {
31+
test.afterEach.always(async t => {
3232
await t.context.worker.tearDown().catch(error => {
3333
console.log('Failed tear down the worker:', error);
3434
});

examples/__tests__/test-non-fungible-token.ava.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ test.beforeEach(async t => {
3838
t.context.accounts = { root, nft, tokenReceiver, tokenId, ali, bob };
3939
});
4040

41-
test.afterEach(async t => {
41+
test.afterEach.always(async t => {
4242
await t.context.worker.tearDown().catch(error => {
4343
console.log('Failed tear down the worker:', error);
4444
});

examples/__tests__/test-parking-lot.ava.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ test.beforeEach(async t => {
1616
t.context.accounts = { root, parkingLot, ali };
1717
});
1818

19-
test.afterEach(async t => {
19+
test.afterEach.always(async t => {
2020
await t.context.worker.tearDown().catch(error => {
2121
console.log('Failed to tear down the worker:', error);
2222
});

examples/__tests__/test-status-message-collections.ava.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ test.beforeEach(async t => {
2424
t.context.accounts = { root, statusMessage, ali, bob, carl };
2525
});
2626

27-
test.afterEach(async t => {
27+
test.afterEach.always(async t => {
2828
await t.context.worker.tearDown().catch(error => {
2929
console.log('Failed to tear down the worker:', error);
3030
});

examples/__tests__/test-status-message.ava.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ test.before(async t => {
2323
t.context.accounts = { root, statusMessage, ali, bob, carl };
2424
});
2525

26-
test.after(async t => {
26+
test.after.always(async t => {
2727
await t.context.worker.tearDown().catch(error => {
2828
console.log('Failed to tear down the worker:', error);
2929
});

tests/__tests__/bytes.ava.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test.beforeEach(async t => {
2020
t.context.accounts = { root, bytesContract, ali };
2121
});
2222

23-
test.afterEach(async t => {
23+
test.afterEach.always(async t => {
2424
await t.context.worker.tearDown().catch(error => {
2525
console.log('Failed to tear down the worker:', error);
2626
});

0 commit comments

Comments
 (0)