From 74735814e9c4550464786c2b4048139b75fb89c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Jakub=20Nani=C5=A1ta?= Date: Thu, 14 Dec 2023 15:40:50 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20OmniGraph=E2=84=A2=20Move=20test?= =?UTF-8?q?=20packages=20under=20tests=20directory=20(#128)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + docker-compose.yaml | 1 + package.json | 3 ++- .../task/oapp/__snapshots__/wire.test.ts.snap | 26 ------------------- .../test-evm-node/hardhat.config.ts | 0 .../test-evm-node/package.json | 0 .../test-evm-node/tsconfig.json | 0 {packages => tests}/test-utils/README.md | 0 {packages => tests}/test-utils/package.json | 0 .../test-utils/src/arbitraries.ts | 0 .../test-utils/src/constants.ts | 0 {packages => tests}/test-utils/src/index.ts | 0 {packages => tests}/test-utils/tsconfig.json | 0 {packages => tests}/test-utils/tsup.config.ts | 0 .../ua-utils-evm-hardhat-test/.eslintignore | 0 .../ua-utils-evm-hardhat-test/.gitignore | 0 .../ua-utils-evm-hardhat-test/.prettierignore | 0 .../ua-utils-evm-hardhat-test/README.md | 0 .../contracts/DefaultOApp.sol | 0 .../contracts/OmniCounter.sol | 0 .../deploy/001_bootstrap.ts | 0 .../deploy/002_oapp.ts | 0 .../deploy/003_omnicounter.ts | 0 .../hardhat.config.ts | 0 .../ua-utils-evm-hardhat-test/jest.config.js | 0 .../ua-utils-evm-hardhat-test/package.json | 0 .../ua-utils-evm-hardhat-test/tasks/index.ts | 0 .../test/__utils__/endpoint.ts | 0 .../test/__utils__/oapp.ts | 0 .../test/__utils__/omnicounter.ts | 0 .../test/endpoint/config.test.ts | 0 .../test/oapp/config.test.ts | 0 .../test/task/getDefaultConfig.test.ts | 0 .../test/task/getOAppConfig.test.ts | 0 .../__data__/configs/invalid.config.001.js | 0 .../__data__/configs/invalid.config.empty.js | 0 .../configs/invalid.config.empty.json | 0 .../configs/valid.config.connected.js | 0 .../__data__/configs/valid.config.empty.js | 0 .../__data__/configs/valid.config.empty.ts | 0 .../configs/valid.config.misconfigured.001.js | 0 .../task/oapp/__snapshots__/wire.test.ts.snap | 26 +++++++++++++++++++ .../test/task/oapp/wire.test.ts | 0 .../ua-utils-evm-hardhat-test/tsconfig.json | 0 .../utils-evm-test/.eslintignore | 0 {packages => tests}/utils-evm-test/.gitignore | 0 .../utils-evm-test/.prettierignore | 0 {packages => tests}/utils-evm-test/README.md | 0 .../utils-evm-test/contracts/ChildEmitter.sol | 0 .../utils-evm-test/contracts/Emitter.sol | 0 .../contracts/ParallelEmitter.sol | 0 .../utils-evm-test/contracts/Thrower.sol | 0 .../utils-evm-test/hardhat.config.ts | 0 .../utils-evm-test/jest.config.js | 0 .../utils-evm-test/package.json | 0 .../utils-evm-test/test/errors/parser.test.ts | 0 .../events/__snapshots__/parser.test.ts.snap | 0 .../utils-evm-test/test/events/parser.test.ts | 0 .../utils-evm-test/tsconfig.json | 0 59 files changed, 30 insertions(+), 27 deletions(-) delete mode 100644 packages/ua-utils-evm-hardhat-test/test/task/oapp/__snapshots__/wire.test.ts.snap rename {packages => tests}/test-evm-node/hardhat.config.ts (100%) rename {packages => tests}/test-evm-node/package.json (100%) rename {packages => tests}/test-evm-node/tsconfig.json (100%) rename {packages => tests}/test-utils/README.md (100%) rename {packages => tests}/test-utils/package.json (100%) rename {packages => tests}/test-utils/src/arbitraries.ts (100%) rename {packages => tests}/test-utils/src/constants.ts (100%) rename {packages => tests}/test-utils/src/index.ts (100%) rename {packages => tests}/test-utils/tsconfig.json (100%) rename {packages => tests}/test-utils/tsup.config.ts (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/.eslintignore (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/.gitignore (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/.prettierignore (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/README.md (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/contracts/DefaultOApp.sol (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/contracts/OmniCounter.sol (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/deploy/001_bootstrap.ts (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/deploy/002_oapp.ts (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/deploy/003_omnicounter.ts (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/hardhat.config.ts (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/jest.config.js (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/package.json (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/tasks/index.ts (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/test/__utils__/endpoint.ts (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/test/__utils__/oapp.ts (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/test/__utils__/omnicounter.ts (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/test/endpoint/config.test.ts (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/test/oapp/config.test.ts (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/test/task/getDefaultConfig.test.ts (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/test/task/getOAppConfig.test.ts (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.001.js (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.empty.js (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.empty.json (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.connected.js (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.empty.js (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.empty.ts (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.misconfigured.001.js (100%) create mode 100644 tests/ua-utils-evm-hardhat-test/test/task/oapp/__snapshots__/wire.test.ts.snap rename {packages => tests}/ua-utils-evm-hardhat-test/test/task/oapp/wire.test.ts (100%) rename {packages => tests}/ua-utils-evm-hardhat-test/tsconfig.json (100%) rename {packages => tests}/utils-evm-test/.eslintignore (100%) rename {packages => tests}/utils-evm-test/.gitignore (100%) rename {packages => tests}/utils-evm-test/.prettierignore (100%) rename {packages => tests}/utils-evm-test/README.md (100%) rename {packages => tests}/utils-evm-test/contracts/ChildEmitter.sol (100%) rename {packages => tests}/utils-evm-test/contracts/Emitter.sol (100%) rename {packages => tests}/utils-evm-test/contracts/ParallelEmitter.sol (100%) rename {packages => tests}/utils-evm-test/contracts/Thrower.sol (100%) rename {packages => tests}/utils-evm-test/hardhat.config.ts (100%) rename {packages => tests}/utils-evm-test/jest.config.js (100%) rename {packages => tests}/utils-evm-test/package.json (100%) rename {packages => tests}/utils-evm-test/test/errors/parser.test.ts (100%) rename {packages => tests}/utils-evm-test/test/events/__snapshots__/parser.test.ts.snap (100%) rename {packages => tests}/utils-evm-test/test/events/parser.test.ts (100%) rename {packages => tests}/utils-evm-test/tsconfig.json (100%) diff --git a/README.md b/README.md index aa53c2deb..4fef8435a 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ The code is arranged into: - **Reusable packages** under `./packages` directory - **Example projects** under `./examples` directory +- **Test projects & helpers** under `./tests` directory ## Development diff --git a/docker-compose.yaml b/docker-compose.yaml index 71d121997..1135a62c0 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -56,6 +56,7 @@ services: volumes: - ./node_modules/.cache/turbo:/app/node_modules/.cache/turbo - ./packages:/app/packages + - ./tests:/app/tests # Hardhat has an issue with caching compilers inside a docker container, # failing with EACCES -13 error, pointing to a permissions issue with the cache folder. # diff --git a/package.json b/package.json index 335f93260..2a26f574d 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "private": true, "workspaces": [ "examples/*", - "packages/*" + "packages/*", + "tests/*" ], "scripts": { "build": "npx turbo run build", diff --git a/packages/ua-utils-evm-hardhat-test/test/task/oapp/__snapshots__/wire.test.ts.snap b/packages/ua-utils-evm-hardhat-test/test/task/oapp/__snapshots__/wire.test.ts.snap deleted file mode 100644 index 1761a1318..000000000 --- a/packages/ua-utils-evm-hardhat-test/test/task/oapp/__snapshots__/wire.test.ts.snap +++ /dev/null @@ -1,26 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`task/oapp/wire with invalid configs should fail if the config file does not exist 1`] = `[Error: Unable to read config file '/app/packages/ua-utils-evm-hardhat-test/does-not-exist.js'. Check that the file exists and is readable to your terminal user]`; - -exports[`task/oapp/wire with invalid configs should fail if the config file is not a file 1`] = `[Error: Unable to read config file '/app/packages/ua-utils-evm-hardhat-test/test/task/oapp'. Check that the file exists and is readable to your terminal user]`; - -exports[`task/oapp/wire with invalid configs should fail if the config file is not a valid JSON or JS file 1`] = `[Error: Unable to read config file '/app/packages/ua-utils-evm-hardhat-test/README.md': SyntaxError: Unexpected token '<']`; - -exports[`task/oapp/wire with invalid configs should fail with a malformed JS file (001) 1`] = ` -[Error: Config from file '/app/packages/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.001.js' is malformed. Please fix the following errors: - -Property 'contracts.0.contract': Invalid input -Property 'contracts.1.contract': Invalid input -Property 'connections': Required] -`; - -exports[`task/oapp/wire with invalid configs should fail with a misconfigured file (001) 1`] = `[Error: Config from file '/app/packages/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.misconfigured.001.js' is invalid: AssertionError [ERR_ASSERTION]: Could not find a deployment for contract 'NonExistent']`; - -exports[`task/oapp/wire with invalid configs should fail with an empty JS file 1`] = ` -[Error: Config from file '/app/packages/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.empty.js' is malformed. Please fix the following errors: - -Property 'contracts': Required -Property 'connections': Required] -`; - -exports[`task/oapp/wire with invalid configs should fail with an empty JSON file 1`] = `[Error: Unable to read config file '/app/packages/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.empty.json': SyntaxError: Unexpected end of JSON input]`; diff --git a/packages/test-evm-node/hardhat.config.ts b/tests/test-evm-node/hardhat.config.ts similarity index 100% rename from packages/test-evm-node/hardhat.config.ts rename to tests/test-evm-node/hardhat.config.ts diff --git a/packages/test-evm-node/package.json b/tests/test-evm-node/package.json similarity index 100% rename from packages/test-evm-node/package.json rename to tests/test-evm-node/package.json diff --git a/packages/test-evm-node/tsconfig.json b/tests/test-evm-node/tsconfig.json similarity index 100% rename from packages/test-evm-node/tsconfig.json rename to tests/test-evm-node/tsconfig.json diff --git a/packages/test-utils/README.md b/tests/test-utils/README.md similarity index 100% rename from packages/test-utils/README.md rename to tests/test-utils/README.md diff --git a/packages/test-utils/package.json b/tests/test-utils/package.json similarity index 100% rename from packages/test-utils/package.json rename to tests/test-utils/package.json diff --git a/packages/test-utils/src/arbitraries.ts b/tests/test-utils/src/arbitraries.ts similarity index 100% rename from packages/test-utils/src/arbitraries.ts rename to tests/test-utils/src/arbitraries.ts diff --git a/packages/test-utils/src/constants.ts b/tests/test-utils/src/constants.ts similarity index 100% rename from packages/test-utils/src/constants.ts rename to tests/test-utils/src/constants.ts diff --git a/packages/test-utils/src/index.ts b/tests/test-utils/src/index.ts similarity index 100% rename from packages/test-utils/src/index.ts rename to tests/test-utils/src/index.ts diff --git a/packages/test-utils/tsconfig.json b/tests/test-utils/tsconfig.json similarity index 100% rename from packages/test-utils/tsconfig.json rename to tests/test-utils/tsconfig.json diff --git a/packages/test-utils/tsup.config.ts b/tests/test-utils/tsup.config.ts similarity index 100% rename from packages/test-utils/tsup.config.ts rename to tests/test-utils/tsup.config.ts diff --git a/packages/ua-utils-evm-hardhat-test/.eslintignore b/tests/ua-utils-evm-hardhat-test/.eslintignore similarity index 100% rename from packages/ua-utils-evm-hardhat-test/.eslintignore rename to tests/ua-utils-evm-hardhat-test/.eslintignore diff --git a/packages/ua-utils-evm-hardhat-test/.gitignore b/tests/ua-utils-evm-hardhat-test/.gitignore similarity index 100% rename from packages/ua-utils-evm-hardhat-test/.gitignore rename to tests/ua-utils-evm-hardhat-test/.gitignore diff --git a/packages/ua-utils-evm-hardhat-test/.prettierignore b/tests/ua-utils-evm-hardhat-test/.prettierignore similarity index 100% rename from packages/ua-utils-evm-hardhat-test/.prettierignore rename to tests/ua-utils-evm-hardhat-test/.prettierignore diff --git a/packages/ua-utils-evm-hardhat-test/README.md b/tests/ua-utils-evm-hardhat-test/README.md similarity index 100% rename from packages/ua-utils-evm-hardhat-test/README.md rename to tests/ua-utils-evm-hardhat-test/README.md diff --git a/packages/ua-utils-evm-hardhat-test/contracts/DefaultOApp.sol b/tests/ua-utils-evm-hardhat-test/contracts/DefaultOApp.sol similarity index 100% rename from packages/ua-utils-evm-hardhat-test/contracts/DefaultOApp.sol rename to tests/ua-utils-evm-hardhat-test/contracts/DefaultOApp.sol diff --git a/packages/ua-utils-evm-hardhat-test/contracts/OmniCounter.sol b/tests/ua-utils-evm-hardhat-test/contracts/OmniCounter.sol similarity index 100% rename from packages/ua-utils-evm-hardhat-test/contracts/OmniCounter.sol rename to tests/ua-utils-evm-hardhat-test/contracts/OmniCounter.sol diff --git a/packages/ua-utils-evm-hardhat-test/deploy/001_bootstrap.ts b/tests/ua-utils-evm-hardhat-test/deploy/001_bootstrap.ts similarity index 100% rename from packages/ua-utils-evm-hardhat-test/deploy/001_bootstrap.ts rename to tests/ua-utils-evm-hardhat-test/deploy/001_bootstrap.ts diff --git a/packages/ua-utils-evm-hardhat-test/deploy/002_oapp.ts b/tests/ua-utils-evm-hardhat-test/deploy/002_oapp.ts similarity index 100% rename from packages/ua-utils-evm-hardhat-test/deploy/002_oapp.ts rename to tests/ua-utils-evm-hardhat-test/deploy/002_oapp.ts diff --git a/packages/ua-utils-evm-hardhat-test/deploy/003_omnicounter.ts b/tests/ua-utils-evm-hardhat-test/deploy/003_omnicounter.ts similarity index 100% rename from packages/ua-utils-evm-hardhat-test/deploy/003_omnicounter.ts rename to tests/ua-utils-evm-hardhat-test/deploy/003_omnicounter.ts diff --git a/packages/ua-utils-evm-hardhat-test/hardhat.config.ts b/tests/ua-utils-evm-hardhat-test/hardhat.config.ts similarity index 100% rename from packages/ua-utils-evm-hardhat-test/hardhat.config.ts rename to tests/ua-utils-evm-hardhat-test/hardhat.config.ts diff --git a/packages/ua-utils-evm-hardhat-test/jest.config.js b/tests/ua-utils-evm-hardhat-test/jest.config.js similarity index 100% rename from packages/ua-utils-evm-hardhat-test/jest.config.js rename to tests/ua-utils-evm-hardhat-test/jest.config.js diff --git a/packages/ua-utils-evm-hardhat-test/package.json b/tests/ua-utils-evm-hardhat-test/package.json similarity index 100% rename from packages/ua-utils-evm-hardhat-test/package.json rename to tests/ua-utils-evm-hardhat-test/package.json diff --git a/packages/ua-utils-evm-hardhat-test/tasks/index.ts b/tests/ua-utils-evm-hardhat-test/tasks/index.ts similarity index 100% rename from packages/ua-utils-evm-hardhat-test/tasks/index.ts rename to tests/ua-utils-evm-hardhat-test/tasks/index.ts diff --git a/packages/ua-utils-evm-hardhat-test/test/__utils__/endpoint.ts b/tests/ua-utils-evm-hardhat-test/test/__utils__/endpoint.ts similarity index 100% rename from packages/ua-utils-evm-hardhat-test/test/__utils__/endpoint.ts rename to tests/ua-utils-evm-hardhat-test/test/__utils__/endpoint.ts diff --git a/packages/ua-utils-evm-hardhat-test/test/__utils__/oapp.ts b/tests/ua-utils-evm-hardhat-test/test/__utils__/oapp.ts similarity index 100% rename from packages/ua-utils-evm-hardhat-test/test/__utils__/oapp.ts rename to tests/ua-utils-evm-hardhat-test/test/__utils__/oapp.ts diff --git a/packages/ua-utils-evm-hardhat-test/test/__utils__/omnicounter.ts b/tests/ua-utils-evm-hardhat-test/test/__utils__/omnicounter.ts similarity index 100% rename from packages/ua-utils-evm-hardhat-test/test/__utils__/omnicounter.ts rename to tests/ua-utils-evm-hardhat-test/test/__utils__/omnicounter.ts diff --git a/packages/ua-utils-evm-hardhat-test/test/endpoint/config.test.ts b/tests/ua-utils-evm-hardhat-test/test/endpoint/config.test.ts similarity index 100% rename from packages/ua-utils-evm-hardhat-test/test/endpoint/config.test.ts rename to tests/ua-utils-evm-hardhat-test/test/endpoint/config.test.ts diff --git a/packages/ua-utils-evm-hardhat-test/test/oapp/config.test.ts b/tests/ua-utils-evm-hardhat-test/test/oapp/config.test.ts similarity index 100% rename from packages/ua-utils-evm-hardhat-test/test/oapp/config.test.ts rename to tests/ua-utils-evm-hardhat-test/test/oapp/config.test.ts diff --git a/packages/ua-utils-evm-hardhat-test/test/task/getDefaultConfig.test.ts b/tests/ua-utils-evm-hardhat-test/test/task/getDefaultConfig.test.ts similarity index 100% rename from packages/ua-utils-evm-hardhat-test/test/task/getDefaultConfig.test.ts rename to tests/ua-utils-evm-hardhat-test/test/task/getDefaultConfig.test.ts diff --git a/packages/ua-utils-evm-hardhat-test/test/task/getOAppConfig.test.ts b/tests/ua-utils-evm-hardhat-test/test/task/getOAppConfig.test.ts similarity index 100% rename from packages/ua-utils-evm-hardhat-test/test/task/getOAppConfig.test.ts rename to tests/ua-utils-evm-hardhat-test/test/task/getOAppConfig.test.ts diff --git a/packages/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.001.js b/tests/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.001.js similarity index 100% rename from packages/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.001.js rename to tests/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.001.js diff --git a/packages/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.empty.js b/tests/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.empty.js similarity index 100% rename from packages/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.empty.js rename to tests/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.empty.js diff --git a/packages/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.empty.json b/tests/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.empty.json similarity index 100% rename from packages/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.empty.json rename to tests/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.empty.json diff --git a/packages/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.connected.js b/tests/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.connected.js similarity index 100% rename from packages/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.connected.js rename to tests/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.connected.js diff --git a/packages/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.empty.js b/tests/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.empty.js similarity index 100% rename from packages/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.empty.js rename to tests/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.empty.js diff --git a/packages/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.empty.ts b/tests/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.empty.ts similarity index 100% rename from packages/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.empty.ts rename to tests/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.empty.ts diff --git a/packages/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.misconfigured.001.js b/tests/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.misconfigured.001.js similarity index 100% rename from packages/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.misconfigured.001.js rename to tests/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.misconfigured.001.js diff --git a/tests/ua-utils-evm-hardhat-test/test/task/oapp/__snapshots__/wire.test.ts.snap b/tests/ua-utils-evm-hardhat-test/test/task/oapp/__snapshots__/wire.test.ts.snap new file mode 100644 index 000000000..5e016ff4a --- /dev/null +++ b/tests/ua-utils-evm-hardhat-test/test/task/oapp/__snapshots__/wire.test.ts.snap @@ -0,0 +1,26 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`task/oapp/wire with invalid configs should fail if the config file does not exist 1`] = `[Error: Unable to read config file '/app/tests/ua-utils-evm-hardhat-test/does-not-exist.js'. Check that the file exists and is readable to your terminal user]`; + +exports[`task/oapp/wire with invalid configs should fail if the config file is not a file 1`] = `[Error: Unable to read config file '/app/tests/ua-utils-evm-hardhat-test/test/task/oapp'. Check that the file exists and is readable to your terminal user]`; + +exports[`task/oapp/wire with invalid configs should fail if the config file is not a valid JSON or JS file 1`] = `[Error: Unable to read config file '/app/tests/ua-utils-evm-hardhat-test/README.md': SyntaxError: Unexpected token '<']`; + +exports[`task/oapp/wire with invalid configs should fail with a malformed JS file (001) 1`] = ` +[Error: Config from file '/app/tests/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.001.js' is malformed. Please fix the following errors: + +Property 'contracts.0.contract': Invalid input +Property 'contracts.1.contract': Invalid input +Property 'connections': Required] +`; + +exports[`task/oapp/wire with invalid configs should fail with a misconfigured file (001) 1`] = `[Error: Config from file '/app/tests/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/valid.config.misconfigured.001.js' is invalid: AssertionError [ERR_ASSERTION]: Could not find a deployment for contract 'NonExistent']`; + +exports[`task/oapp/wire with invalid configs should fail with an empty JS file 1`] = ` +[Error: Config from file '/app/tests/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.empty.js' is malformed. Please fix the following errors: + +Property 'contracts': Required +Property 'connections': Required] +`; + +exports[`task/oapp/wire with invalid configs should fail with an empty JSON file 1`] = `[Error: Unable to read config file '/app/tests/ua-utils-evm-hardhat-test/test/task/oapp/__data__/configs/invalid.config.empty.json': SyntaxError: Unexpected end of JSON input]`; diff --git a/packages/ua-utils-evm-hardhat-test/test/task/oapp/wire.test.ts b/tests/ua-utils-evm-hardhat-test/test/task/oapp/wire.test.ts similarity index 100% rename from packages/ua-utils-evm-hardhat-test/test/task/oapp/wire.test.ts rename to tests/ua-utils-evm-hardhat-test/test/task/oapp/wire.test.ts diff --git a/packages/ua-utils-evm-hardhat-test/tsconfig.json b/tests/ua-utils-evm-hardhat-test/tsconfig.json similarity index 100% rename from packages/ua-utils-evm-hardhat-test/tsconfig.json rename to tests/ua-utils-evm-hardhat-test/tsconfig.json diff --git a/packages/utils-evm-test/.eslintignore b/tests/utils-evm-test/.eslintignore similarity index 100% rename from packages/utils-evm-test/.eslintignore rename to tests/utils-evm-test/.eslintignore diff --git a/packages/utils-evm-test/.gitignore b/tests/utils-evm-test/.gitignore similarity index 100% rename from packages/utils-evm-test/.gitignore rename to tests/utils-evm-test/.gitignore diff --git a/packages/utils-evm-test/.prettierignore b/tests/utils-evm-test/.prettierignore similarity index 100% rename from packages/utils-evm-test/.prettierignore rename to tests/utils-evm-test/.prettierignore diff --git a/packages/utils-evm-test/README.md b/tests/utils-evm-test/README.md similarity index 100% rename from packages/utils-evm-test/README.md rename to tests/utils-evm-test/README.md diff --git a/packages/utils-evm-test/contracts/ChildEmitter.sol b/tests/utils-evm-test/contracts/ChildEmitter.sol similarity index 100% rename from packages/utils-evm-test/contracts/ChildEmitter.sol rename to tests/utils-evm-test/contracts/ChildEmitter.sol diff --git a/packages/utils-evm-test/contracts/Emitter.sol b/tests/utils-evm-test/contracts/Emitter.sol similarity index 100% rename from packages/utils-evm-test/contracts/Emitter.sol rename to tests/utils-evm-test/contracts/Emitter.sol diff --git a/packages/utils-evm-test/contracts/ParallelEmitter.sol b/tests/utils-evm-test/contracts/ParallelEmitter.sol similarity index 100% rename from packages/utils-evm-test/contracts/ParallelEmitter.sol rename to tests/utils-evm-test/contracts/ParallelEmitter.sol diff --git a/packages/utils-evm-test/contracts/Thrower.sol b/tests/utils-evm-test/contracts/Thrower.sol similarity index 100% rename from packages/utils-evm-test/contracts/Thrower.sol rename to tests/utils-evm-test/contracts/Thrower.sol diff --git a/packages/utils-evm-test/hardhat.config.ts b/tests/utils-evm-test/hardhat.config.ts similarity index 100% rename from packages/utils-evm-test/hardhat.config.ts rename to tests/utils-evm-test/hardhat.config.ts diff --git a/packages/utils-evm-test/jest.config.js b/tests/utils-evm-test/jest.config.js similarity index 100% rename from packages/utils-evm-test/jest.config.js rename to tests/utils-evm-test/jest.config.js diff --git a/packages/utils-evm-test/package.json b/tests/utils-evm-test/package.json similarity index 100% rename from packages/utils-evm-test/package.json rename to tests/utils-evm-test/package.json diff --git a/packages/utils-evm-test/test/errors/parser.test.ts b/tests/utils-evm-test/test/errors/parser.test.ts similarity index 100% rename from packages/utils-evm-test/test/errors/parser.test.ts rename to tests/utils-evm-test/test/errors/parser.test.ts diff --git a/packages/utils-evm-test/test/events/__snapshots__/parser.test.ts.snap b/tests/utils-evm-test/test/events/__snapshots__/parser.test.ts.snap similarity index 100% rename from packages/utils-evm-test/test/events/__snapshots__/parser.test.ts.snap rename to tests/utils-evm-test/test/events/__snapshots__/parser.test.ts.snap diff --git a/packages/utils-evm-test/test/events/parser.test.ts b/tests/utils-evm-test/test/events/parser.test.ts similarity index 100% rename from packages/utils-evm-test/test/events/parser.test.ts rename to tests/utils-evm-test/test/events/parser.test.ts diff --git a/packages/utils-evm-test/tsconfig.json b/tests/utils-evm-test/tsconfig.json similarity index 100% rename from packages/utils-evm-test/tsconfig.json rename to tests/utils-evm-test/tsconfig.json