Skip to content

Commit

Permalink
update pretests
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Jul 9, 2024
1 parent e065cf3 commit fb30ed5
Show file tree
Hide file tree
Showing 164 changed files with 215 additions and 195 deletions.
2 changes: 1 addition & 1 deletion examples/apollo_server/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code apollo_server || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/async_await/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code async_await || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/audio_and_video/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code backend || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/audio_recorder/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code audio_recorder || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/autoreload/test/pretest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { writeFileSync } from 'fs';

import { originalServerTs } from './server_source';

async function pretest() {
function pretest(): void {
writeFileSync('./src/server.ts', originalServerTs);

execSync(`dfx canister uninstall-code autoreload || true`, {
Expand Down
2 changes: 1 addition & 1 deletion examples/basic_bitcoin/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code basic_bitcoin || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/bitcoin/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`rm -rf .bitcoin/data/regtest`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/bitcoin_psbt/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
// TODO remove basic_bitcoin install and link after https://github.com/demergent-labs/azle/issues/1807 is resolved
execSync(`cd ../basic_bitcoin && npm install`);

Expand Down
2 changes: 1 addition & 1 deletion examples/bitcoinjs_lib/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
// TODO remove bitcore_lib install and link after https://github.com/demergent-labs/azle/issues/1807 is resolved
execSync(`cd ../bitcore_lib && npm install`);

Expand Down
2 changes: 1 addition & 1 deletion examples/bitcore_lib/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code bitcore || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/blob_array/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code blob_array || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/bytes/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code bytes_canister || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/call_raw/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code call_raw || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/candid_encoding/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code candid_encoding || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/candid_keywords/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code candid_keywords || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/canister/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getCanisterId } from 'azle/dfx';
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code canister || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/ckbtc/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
uninstall(
'ckbtc',
'internet_identity',
Expand Down
2 changes: 1 addition & 1 deletion examples/complex_init/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code complex_init || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/complex_types/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code complex_types || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/composite_queries/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getCanisterId } from 'azle/dfx';
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code canister1 || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/counter/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code counter || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/cross_canister_calls/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getCanisterId } from 'azle/dfx';
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code canister1 || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/cycles/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getCanisterId } from 'azle/dfx';
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code cycles || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/date/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code date || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/ethereum_json_rpc/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code ethereum_json_rpc || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/ethers/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code ethers || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/ethers_base/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code server || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/express/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code express || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/fetch_ic/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code backend || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/file_protocol/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code backend || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/fs/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code fs || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/func_types/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getCanisterId } from 'azle/dfx';
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code func_types || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/guard_functions/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code guard_functions || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/heartbeat/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code heartbeat_async || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/hello_world/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code backend || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/http_outcall_fetch/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code server || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/hybrid_canister/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code server || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/ic_api/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code ic_api || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/ic_evm_rpc/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code evm_rpc || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/icrc/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest(icrcPath: string) {
function pretest(icrcPath: string): void {
execSync(`dfx canister uninstall-code proxy || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/imports/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code imports || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/init/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code init || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/inspect_message/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code inspect_message || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/internet_identity/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code backend || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/key_value_store/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code key_value_store || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/large_files/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code backend || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/ledger_canister/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getCanisterId } from 'azle/dfx';
import { execSync } from 'child_process';

async function pretest(icp_ledger_path: string) {
function pretest(icp_ledger_path: string): void {
execSync(`dfx canister uninstall-code icp_ledger || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/list_of_lists/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code list_of_lists || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/management_canister/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
function pretest(): void {
execSync(`dfx canister uninstall-code management_canister || true`, {
stdio: 'inherit'
});
Expand Down
Loading

0 comments on commit fb30ed5

Please sign in to comment.