diff --git a/.changeset/spicy-llamas-fetch.md b/.changeset/spicy-llamas-fetch.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/spicy-llamas-fetch.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/.github/actions/test-setup/action.yaml b/.github/actions/test-setup/action.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/.github/workflows/browser-e2e-tests.yaml b/.github/workflows/browser-e2e-tests.yaml new file mode 100644 index 00000000000..292ab353d53 --- /dev/null +++ b/.github/workflows/browser-e2e-tests.yaml @@ -0,0 +1,44 @@ +name: "Browser e2e tests" + +on: + pull_request: + push: + branches: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + browser-e2e-tests: + # only run this job if the base branch is dp/testing-groups + if: ${{github.ref_name == '728/merge'}} + runs-on: ubuntu-latest + outputs: + status: ${{ job.status }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: CI Setup + uses: ./.github/actions/ci-setup + + - name: Build + run: | + BUILD_VERSION="0.0.0-${{ github.ref_name }}-$(git rev-parse --short $GITHUB_SHA)" pnpm build + + - name: Run services + run: pnpm services:run + + - name: Browser e2e tests + run: npx jest -- "**/*.common.e2e.test.ts" --setupFilesAfterEnv=./setup-puppeteer.ts --testTimeout=30000 --coverage + + - name: Upload coverage to Github artifacts + uses: actions/upload-artifact@v2 + with: + name: browser-e2e-coverage + path: coverage + + - name: Stop services + run: pnpm services:clean diff --git a/.github/workflows/browser-unit-tests.yaml b/.github/workflows/browser-unit-tests.yaml new file mode 100644 index 00000000000..4cf4828c4c7 --- /dev/null +++ b/.github/workflows/browser-unit-tests.yaml @@ -0,0 +1,38 @@ +name: "Browser unit tests" + +on: + pull_request: + push: + branches: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + browser-unit-tests: + # only run this job if the base branch is dp/testing-groups + if: ${{github.ref_name == '728/merge'}} + runs-on: ubuntu-latest + outputs: + status: ${{ job.status }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: CI Setup + uses: ./.github/actions/ci-setup + + - name: Build + run: | + BUILD_VERSION="0.0.0-${{ github.ref_name }}-$(git rev-parse --short $GITHUB_SHA)" pnpm build + + - name: Browser unit tests + run: npx jest -- "**/*.common.unit.test.ts" --setupFilesAfterEnv=./setup-puppeteer.ts --testTimeout=30000 --coverage + + - name: Upload coverage to Github artifacts + uses: actions/upload-artifact@v2 + with: + name: browser-unit-coverage + path: coverage diff --git a/.github/workflows/node-e2e-tests.yaml b/.github/workflows/node-e2e-tests.yaml new file mode 100644 index 00000000000..667bdc5faae --- /dev/null +++ b/.github/workflows/node-e2e-tests.yaml @@ -0,0 +1,44 @@ +name: "Node e2e tests" + +on: + pull_request: + push: + branches: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + node-e2e-tests: + # only run this job if the base branch is dp/testing-groups + if: ${{github.ref_name == '728/merge'}} + runs-on: ubuntu-latest + outputs: + status: ${{ job.status }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: CI Setup + uses: ./.github/actions/ci-setup + + - name: Build + run: | + BUILD_VERSION="0.0.0-${{ github.ref_name }}-$(git rev-parse --short $GITHUB_SHA)" pnpm build + + - name: Run services + run: pnpm services:run + + - name: Node e2e tests + run: npx jest -- "**/*.node.e2e.test.ts" --coverage + + - name: Upload coverage to Github artifacts + uses: actions/upload-artifact@v2 + with: + name: node-e2e-coverage + path: coverage + + - name: Stop services + run: pnpm services:clean diff --git a/.github/workflows/node-unit-tests.yaml b/.github/workflows/node-unit-tests.yaml new file mode 100644 index 00000000000..21e0092c02e --- /dev/null +++ b/.github/workflows/node-unit-tests.yaml @@ -0,0 +1,38 @@ +name: "Node unit tests" + +on: + pull_request: + push: + branches: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + node-unit-tests: + # only run this job if the base branch is dp/testing-groups + if: ${{github.ref_name == '728/merge'}} + runs-on: ubuntu-latest + outputs: + status: ${{ job.status }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: CI Setup + uses: ./.github/actions/ci-setup + + - name: Build + run: | + BUILD_VERSION="0.0.0-${{ github.ref_name }}-$(git rev-parse --short $GITHUB_SHA)" pnpm build + + - name: Node unit tests + run: npx jest -- "**/*.node.unit.test.ts" --coverage + + - name: Upload coverage to Github artifacts + uses: actions/upload-artifact@v2 + with: + name: node-unit-coverage + path: coverage diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml new file mode 100644 index 00000000000..cf089ccb20b --- /dev/null +++ b/.github/workflows/test-coverage.yaml @@ -0,0 +1,51 @@ +name: "Test coverage" + +on: + workflow_run: + workflows: + [Node unit tests, Node e2e tests, Browser unit tests, Browser e2e tests] + types: [completed] + +jobs: + collect-coverage: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Download coverage report for Browser unit tests + uses: dawidd6/action-download-artifact@v2 + with: + workflow: browser-unit-tests.yaml + name: browswer-unit-coverage + path: browser-unit-coverage + + - name: Download coverage report for Browser e2e tests + uses: dawidd6/action-download-artifact@v2 + with: + workflow: browser-e2e-tests.yaml + name: browswer-e2e-coverage + path: browser-e2e-coverage + + - name: Download coverage report for Node unit tests + uses: dawidd6/action-download-artifact@v2 + with: + workflow: node-unit-tests.yaml + name: node-unit-coverage + path: node-unit-coverage + + - name: Download coverage report for Node e2e tests + uses: dawidd6/action-download-artifact@v2 + with: + workflow: node-e2e-tests.yaml + name: node-e2e-coverage + path: node-e2e-coverage + + - name: Merge all coverage reports + run: npx istanbul-merge --out coverage-merged.json browser-unit-coverage/coverage-final.json browser-e2e-coverage/coverage-final.json node-unit-coverage/coverage-final.json node-e2e-coverage/coverage-final.json + + - name: Upload coverage report to Codecov + uses: codecov/codecov-action@v3 + with: + files: coverage-merged.json + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4055b1b0d9f..e87832b6d6f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -26,11 +26,9 @@ jobs: - name: Build run: | BUILD_VERSION="0.0.0-${{ github.ref_name }}-$(git rev-parse --short $GITHUB_SHA)" pnpm build - - name: Lint run: | pnpm lint - - name: Checking PR Number uses: jwalton/gh-find-current-pr@v1 id: findPr diff --git a/jest.env.ts b/jest.env.ts index 6501cc2cab5..b3715b450b4 100644 --- a/jest.env.ts +++ b/jest.env.ts @@ -1,9 +1,14 @@ import './hbs.d'; import { hexlify } from '@ethersproject/bytes'; +import { TextEncoder, TextDecoder } from 'util'; import faucets from './services/fuel-core/faucets.json'; +global.TextEncoder = TextEncoder; +// @ts-expect-error - incompatible types +global.TextDecoder = TextDecoder; + /** * Gets the private key for the current Jest worker. * diff --git a/package.json b/package.json index c6bc2721958..a118b01da12 100644 --- a/package.json +++ b/package.json @@ -76,6 +76,7 @@ "npm-run-all": "^4.1.5", "open": "^8.4.0", "prettier": "^2.7.1", + "puppeteer": "^19.6.2", "shelljs": "^0.8.5", "ts-generator": "^0.1.1", "ts-jest": "^29.0.3", diff --git a/packages/abi-coder/src/abi-coder.test.ts b/packages/abi-coder/src/abi-coder.node.unit.test.ts similarity index 100% rename from packages/abi-coder/src/abi-coder.test.ts rename to packages/abi-coder/src/abi-coder.node.unit.test.ts diff --git a/packages/abi-coder/src/coders/coders.test.ts b/packages/abi-coder/src/coders/coders.node.unit.ts similarity index 100% rename from packages/abi-coder/src/coders/coders.test.ts rename to packages/abi-coder/src/coders/coders.node.unit.ts diff --git a/packages/abi-coder/src/interface.test.ts b/packages/abi-coder/src/interface.node.unit.test.ts similarity index 100% rename from packages/abi-coder/src/interface.test.ts rename to packages/abi-coder/src/interface.node.unit.test.ts diff --git a/packages/abi-coder/src/json-abi.test.ts b/packages/abi-coder/src/json-abi.node.unit.test.ts similarity index 100% rename from packages/abi-coder/src/json-abi.test.ts rename to packages/abi-coder/src/json-abi.node.unit.test.ts diff --git a/packages/abi-typegen/src/Abi.test.ts b/packages/abi-typegen/src/Abi.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/Abi.test.ts rename to packages/abi-typegen/src/Abi.node.unit.test.ts diff --git a/packages/abi-typegen/src/AbiTypeGen.test.ts b/packages/abi-typegen/src/AbiTypeGen.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/AbiTypeGen.test.ts rename to packages/abi-typegen/src/AbiTypeGen.node.unit.test.ts diff --git a/packages/abi-typegen/src/cli.test.ts b/packages/abi-typegen/src/cli.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/cli.test.ts rename to packages/abi-typegen/src/cli.node.unit.test.ts diff --git a/packages/abi-typegen/src/functions/Function.test.ts b/packages/abi-typegen/src/functions/Function.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/functions/Function.test.ts rename to packages/abi-typegen/src/functions/Function.node.unit.test.ts diff --git a/packages/abi-typegen/src/index.test.ts b/packages/abi-typegen/src/index.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/index.test.ts rename to packages/abi-typegen/src/index.node.unit.test.ts diff --git a/packages/abi-typegen/src/runTypegen.test.ts b/packages/abi-typegen/src/runTypegen.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/runTypegen.test.ts rename to packages/abi-typegen/src/runTypegen.node.unit.test.ts diff --git a/packages/abi-typegen/src/templates/common/common.test.ts b/packages/abi-typegen/src/templates/common/common.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/templates/common/common.test.ts rename to packages/abi-typegen/src/templates/common/common.node.unit.test.ts diff --git a/packages/abi-typegen/src/templates/contract/dts.test.ts b/packages/abi-typegen/src/templates/contract/dts.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/templates/contract/dts.test.ts rename to packages/abi-typegen/src/templates/contract/dts.node.unit.test.ts diff --git a/packages/abi-typegen/src/templates/contract/factory.test.ts b/packages/abi-typegen/src/templates/contract/factory.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/templates/contract/factory.test.ts rename to packages/abi-typegen/src/templates/contract/factory.node.unit.test.ts diff --git a/packages/abi-typegen/src/templates/contract/index.test.ts b/packages/abi-typegen/src/templates/contract/index.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/templates/contract/index.test.ts rename to packages/abi-typegen/src/templates/contract/index.node.unit.test.ts diff --git a/packages/abi-typegen/src/templates/utils/renderHbsTemplate.test.ts b/packages/abi-typegen/src/templates/utils/renderHbsTemplate.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/templates/utils/renderHbsTemplate.test.ts rename to packages/abi-typegen/src/templates/utils/renderHbsTemplate.node.unit.test.ts diff --git a/packages/abi-typegen/src/types/ArrayType.test.ts b/packages/abi-typegen/src/types/ArrayType.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/types/ArrayType.test.ts rename to packages/abi-typegen/src/types/ArrayType.node.unit.test.ts diff --git a/packages/abi-typegen/src/types/B256Type.test.ts b/packages/abi-typegen/src/types/B256Type.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/types/B256Type.test.ts rename to packages/abi-typegen/src/types/B256Type.node.unit.test.ts diff --git a/packages/abi-typegen/src/types/B512Type.test.ts b/packages/abi-typegen/src/types/B512Type.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/types/B512Type.test.ts rename to packages/abi-typegen/src/types/B512Type.node.unit.test.ts diff --git a/packages/abi-typegen/src/types/BoolType.test.ts b/packages/abi-typegen/src/types/BoolType.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/types/BoolType.test.ts rename to packages/abi-typegen/src/types/BoolType.node.unit.test.ts diff --git a/packages/abi-typegen/src/types/EnumType.test.ts b/packages/abi-typegen/src/types/EnumType.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/types/EnumType.test.ts rename to packages/abi-typegen/src/types/EnumType.node.unit.test.ts diff --git a/packages/abi-typegen/src/types/GenericType.test.ts b/packages/abi-typegen/src/types/GenericType.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/types/GenericType.test.ts rename to packages/abi-typegen/src/types/GenericType.node.unit.test.ts diff --git a/packages/abi-typegen/src/types/OptionType.test.ts b/packages/abi-typegen/src/types/OptionType.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/types/OptionType.test.ts rename to packages/abi-typegen/src/types/OptionType.node.unit.test.ts diff --git a/packages/abi-typegen/src/types/RawUntypedPtr.test.ts b/packages/abi-typegen/src/types/RawUntypedPtr.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/types/RawUntypedPtr.test.ts rename to packages/abi-typegen/src/types/RawUntypedPtr.node.unit.test.ts diff --git a/packages/abi-typegen/src/types/StrType.test.ts b/packages/abi-typegen/src/types/StrType.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/types/StrType.test.ts rename to packages/abi-typegen/src/types/StrType.node.unit.test.ts diff --git a/packages/abi-typegen/src/types/StructType.test.ts b/packages/abi-typegen/src/types/StructType.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/types/StructType.test.ts rename to packages/abi-typegen/src/types/StructType.node.unit.test.ts diff --git a/packages/abi-typegen/src/types/TupleType.test.ts b/packages/abi-typegen/src/types/TupleType.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/types/TupleType.test.ts rename to packages/abi-typegen/src/types/TupleType.node.unit.test.ts diff --git a/packages/abi-typegen/src/types/U16Type.test.ts b/packages/abi-typegen/src/types/U16Type.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/types/U16Type.test.ts rename to packages/abi-typegen/src/types/U16Type.node.unit.test.ts diff --git a/packages/abi-typegen/src/types/U32Type.test.ts b/packages/abi-typegen/src/types/U32Type.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/types/U32Type.test.ts rename to packages/abi-typegen/src/types/U32Type.node.unit.test.ts diff --git a/packages/abi-typegen/src/types/U64Type.test.ts b/packages/abi-typegen/src/types/U64Type.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/types/U64Type.test.ts rename to packages/abi-typegen/src/types/U64Type.node.unit.test.ts diff --git a/packages/abi-typegen/src/types/U8Type.test.ts b/packages/abi-typegen/src/types/U8Type.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/types/U8Type.test.ts rename to packages/abi-typegen/src/types/U8Type.node.unit.test.ts diff --git a/packages/abi-typegen/src/types/VectorType.test.ts b/packages/abi-typegen/src/types/VectorType.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/types/VectorType.test.ts rename to packages/abi-typegen/src/types/VectorType.node.unit.test.ts diff --git a/packages/abi-typegen/src/utils/extractStructName.test.ts b/packages/abi-typegen/src/utils/extractStructName.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/utils/extractStructName.test.ts rename to packages/abi-typegen/src/utils/extractStructName.node.unit.test.ts diff --git a/packages/abi-typegen/src/utils/findType.test.ts b/packages/abi-typegen/src/utils/findType.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/utils/findType.test.ts rename to packages/abi-typegen/src/utils/findType.node.unit.test.ts diff --git a/packages/abi-typegen/src/utils/makeFunction.test.ts b/packages/abi-typegen/src/utils/makeFunction.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/utils/makeFunction.test.ts rename to packages/abi-typegen/src/utils/makeFunction.node.unit.test.ts diff --git a/packages/abi-typegen/src/utils/makeType.test.ts b/packages/abi-typegen/src/utils/makeType.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/utils/makeType.test.ts rename to packages/abi-typegen/src/utils/makeType.node.unit.test.ts diff --git a/packages/abi-typegen/src/utils/normalize.test.ts b/packages/abi-typegen/src/utils/normalize.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/utils/normalize.test.ts rename to packages/abi-typegen/src/utils/normalize.node.unit.test.ts diff --git a/packages/abi-typegen/src/utils/parseFunctions.test.ts b/packages/abi-typegen/src/utils/parseFunctions.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/utils/parseFunctions.test.ts rename to packages/abi-typegen/src/utils/parseFunctions.node.unit.test.ts diff --git a/packages/abi-typegen/src/utils/parseTypeArguments.test.ts b/packages/abi-typegen/src/utils/parseTypeArguments.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/utils/parseTypeArguments.test.ts rename to packages/abi-typegen/src/utils/parseTypeArguments.node.unit.test.ts diff --git a/packages/abi-typegen/src/utils/parseTypes.test.ts b/packages/abi-typegen/src/utils/parseTypes.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/utils/parseTypes.test.ts rename to packages/abi-typegen/src/utils/parseTypes.node.unit.test.ts diff --git a/packages/abi-typegen/src/utils/shouldSkipType.test.ts b/packages/abi-typegen/src/utils/shouldSkipType.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/utils/shouldSkipType.test.ts rename to packages/abi-typegen/src/utils/shouldSkipType.node.unit.test.ts diff --git a/packages/abi-typegen/src/utils/supportedTypes.test.ts b/packages/abi-typegen/src/utils/supportedTypes.node.unit.test.ts similarity index 100% rename from packages/abi-typegen/src/utils/supportedTypes.test.ts rename to packages/abi-typegen/src/utils/supportedTypes.node.unit.test.ts diff --git a/packages/address/src/address.test.ts b/packages/address/src/address.common.unit.test.ts similarity index 100% rename from packages/address/src/address.test.ts rename to packages/address/src/address.common.unit.test.ts diff --git a/packages/example-contract/src/example-contract.test.ts b/packages/example-contract/src/example-contract.node.e2e.test.ts similarity index 100% rename from packages/example-contract/src/example-contract.test.ts rename to packages/example-contract/src/example-contract.node.e2e.test.ts diff --git a/packages/fuel-gauge/src/advanced-logging.test.ts b/packages/fuel-gauge/src/advanced-logging.node.e2e.test.ts similarity index 100% rename from packages/fuel-gauge/src/advanced-logging.test.ts rename to packages/fuel-gauge/src/advanced-logging.node.e2e.test.ts diff --git a/packages/fuel-gauge/src/auth-testing.test.ts b/packages/fuel-gauge/src/auth-testing.node.e2e.test.ts similarity index 100% rename from packages/fuel-gauge/src/auth-testing.test.ts rename to packages/fuel-gauge/src/auth-testing.node.e2e.test.ts diff --git a/packages/fuel-gauge/src/call-test-contract.test.ts b/packages/fuel-gauge/src/call-test-contract.node.e2e.test.ts similarity index 100% rename from packages/fuel-gauge/src/call-test-contract.test.ts rename to packages/fuel-gauge/src/call-test-contract.node.e2e.test.ts diff --git a/packages/fuel-gauge/src/contract-factory.test.ts b/packages/fuel-gauge/src/contract-factory.node.e2e.test.ts similarity index 100% rename from packages/fuel-gauge/src/contract-factory.test.ts rename to packages/fuel-gauge/src/contract-factory.node.e2e.test.ts diff --git a/packages/fuel-gauge/src/contract.test.ts b/packages/fuel-gauge/src/contract.node.e2e.test.ts similarity index 100% rename from packages/fuel-gauge/src/contract.test.ts rename to packages/fuel-gauge/src/contract.node.e2e.test.ts diff --git a/packages/fuel-gauge/src/coverage-contract.test.ts b/packages/fuel-gauge/src/coverage-contract.node.e2e.test.ts similarity index 100% rename from packages/fuel-gauge/src/coverage-contract.test.ts rename to packages/fuel-gauge/src/coverage-contract.node.e2e.test.ts diff --git a/packages/fuel-gauge/src/doc-examples.test.ts b/packages/fuel-gauge/src/doc-examples.node.e2e.test.ts similarity index 100% rename from packages/fuel-gauge/src/doc-examples.test.ts rename to packages/fuel-gauge/src/doc-examples.node.e2e.test.ts diff --git a/packages/fuel-gauge/src/edge-cases.test.ts b/packages/fuel-gauge/src/edge-cases.node.e2e.test.ts similarity index 100% rename from packages/fuel-gauge/src/edge-cases.test.ts rename to packages/fuel-gauge/src/edge-cases.node.e2e.test.ts diff --git a/packages/fuel-gauge/src/generic-types-contract.test.ts b/packages/fuel-gauge/src/generic-types-contract.node.e2e.test.ts similarity index 98% rename from packages/fuel-gauge/src/generic-types-contract.test.ts rename to packages/fuel-gauge/src/generic-types-contract.node.e2e.test.ts index 9cc1705d04f..dc3584e9b17 100644 --- a/packages/fuel-gauge/src/generic-types-contract.test.ts +++ b/packages/fuel-gauge/src/generic-types-contract.node.e2e.test.ts @@ -10,6 +10,9 @@ const contractBytecode = readFileSync( join(__dirname, '../test-projects/generic-types-contract/out/debug/generic-types-contract.bin') ); +/* + * @group node/e2e + */ describe('GenericTypesContract', () => { it('should call complex contract function with generic type', async () => { const contract = await setup({ diff --git a/packages/fuel-gauge/src/payable-annotation.test.ts b/packages/fuel-gauge/src/payable-annotation.node.e2e.test.ts similarity index 100% rename from packages/fuel-gauge/src/payable-annotation.test.ts rename to packages/fuel-gauge/src/payable-annotation.node.e2e.test.ts diff --git a/packages/fuel-gauge/src/predicate.test.ts b/packages/fuel-gauge/src/predicate.node.e2e.test.ts similarity index 100% rename from packages/fuel-gauge/src/predicate.test.ts rename to packages/fuel-gauge/src/predicate.node.e2e.test.ts diff --git a/packages/fuel-gauge/src/script-main-args.test.ts b/packages/fuel-gauge/src/script-main-args.node.e2e.test.ts similarity index 100% rename from packages/fuel-gauge/src/script-main-args.test.ts rename to packages/fuel-gauge/src/script-main-args.node.e2e.test.ts diff --git a/packages/fuel-gauge/src/storage-test-contract.test.ts b/packages/fuel-gauge/src/storage-test-contract.node.e2e.test.ts similarity index 100% rename from packages/fuel-gauge/src/storage-test-contract.test.ts rename to packages/fuel-gauge/src/storage-test-contract.node.e2e.test.ts diff --git a/packages/fuel-gauge/src/token-test-contract.test.ts b/packages/fuel-gauge/src/token-test-contract.node.e2e.test.ts similarity index 100% rename from packages/fuel-gauge/src/token-test-contract.test.ts rename to packages/fuel-gauge/src/token-test-contract.node.e2e.test.ts diff --git a/packages/fuels/src/cli.test.ts b/packages/fuels/src/cli.node.unit.test.ts similarity index 100% rename from packages/fuels/src/cli.test.ts rename to packages/fuels/src/cli.node.unit.test.ts diff --git a/packages/fuels/src/index.test.ts b/packages/fuels/src/index.node.unit.test.ts similarity index 100% rename from packages/fuels/src/index.test.ts rename to packages/fuels/src/index.node.unit.test.ts diff --git a/packages/hasher/src/hasher.test.ts b/packages/hasher/src/hasher.common.unit.test.ts similarity index 100% rename from packages/hasher/src/hasher.test.ts rename to packages/hasher/src/hasher.common.unit.test.ts diff --git a/packages/hdwallet/src/hdwallet.test.ts b/packages/hdwallet/src/hdwallet.common.unit.test.ts similarity index 100% rename from packages/hdwallet/src/hdwallet.test.ts rename to packages/hdwallet/src/hdwallet.common.unit.test.ts diff --git a/packages/keystore/src/keystore.test.ts b/packages/keystore/src/keystore.common.unit.test.ts similarity index 100% rename from packages/keystore/src/keystore.test.ts rename to packages/keystore/src/keystore.common.unit.test.ts diff --git a/packages/math/src/bn.test.ts b/packages/math/src/bn.common.unit.test.ts similarity index 100% rename from packages/math/src/bn.test.ts rename to packages/math/src/bn.common.unit.test.ts diff --git a/packages/math/src/functional.test.ts b/packages/math/src/functional.common.unit.test.ts similarity index 100% rename from packages/math/src/functional.test.ts rename to packages/math/src/functional.common.unit.test.ts diff --git a/packages/merkle/src/binaryMerkleTree.test.ts b/packages/merkle/src/binaryMerkleTree.common.unit.test.ts similarity index 100% rename from packages/merkle/src/binaryMerkleTree.test.ts rename to packages/merkle/src/binaryMerkleTree.common.unit.test.ts diff --git a/packages/merklesum/src/sumMerkleTree.test.ts b/packages/merklesum/src/sumMerkleTree.common.unit.test.ts similarity index 100% rename from packages/merklesum/src/sumMerkleTree.test.ts rename to packages/merklesum/src/sumMerkleTree.common.unit.test.ts diff --git a/packages/mnemonic/src/mnemonic.test.ts b/packages/mnemonic/src/mnemonic.common.unit.test.ts similarity index 100% rename from packages/mnemonic/src/mnemonic.test.ts rename to packages/mnemonic/src/mnemonic.common.unit.test.ts diff --git a/packages/mnemonic/src/utils.test.ts b/packages/mnemonic/src/utils.common.unit.test.ts similarity index 100% rename from packages/mnemonic/src/utils.test.ts rename to packages/mnemonic/src/utils.common.unit.test.ts diff --git a/packages/predicate/src/predicate.test.ts b/packages/predicate/src/predicate.common.e2e.test.ts similarity index 100% rename from packages/predicate/src/predicate.test.ts rename to packages/predicate/src/predicate.common.e2e.test.ts diff --git a/packages/program/src/contract.test.ts b/packages/program/src/contract.common.e2e.test.ts similarity index 100% rename from packages/program/src/contract.test.ts rename to packages/program/src/contract.common.e2e.test.ts diff --git a/packages/providers/src/provider.test.ts b/packages/providers/src/provider.common.e2e.test.ts similarity index 100% rename from packages/providers/src/provider.test.ts rename to packages/providers/src/provider.common.e2e.test.ts diff --git a/packages/providers/src/utils/block-explorer.test.ts b/packages/providers/src/utils/block-explorer.common.unit.test.ts similarity index 100% rename from packages/providers/src/utils/block-explorer.test.ts rename to packages/providers/src/utils/block-explorer.common.unit.test.ts diff --git a/packages/script/src/script.test.ts b/packages/script/src/script.common.e2e.test.ts similarity index 100% rename from packages/script/src/script.test.ts rename to packages/script/src/script.common.e2e.test.ts diff --git a/packages/signer/src/signer.test.ts b/packages/signer/src/signer.common.unit.test.ts similarity index 100% rename from packages/signer/src/signer.test.ts rename to packages/signer/src/signer.common.unit.test.ts diff --git a/packages/sparsemerkle/src/sparseMerkleTree.test.ts b/packages/sparsemerkle/src/sparseMerkleTree.common.unit.test.ts similarity index 100% rename from packages/sparsemerkle/src/sparseMerkleTree.test.ts rename to packages/sparsemerkle/src/sparseMerkleTree.common.unit.test.ts diff --git a/packages/transactions/src/coders/byte-array.test.ts b/packages/transactions/src/coders/byte-array.common.unit.test.ts similarity index 100% rename from packages/transactions/src/coders/byte-array.test.ts rename to packages/transactions/src/coders/byte-array.common.unit.test.ts diff --git a/packages/transactions/src/coders/input.test.ts b/packages/transactions/src/coders/input.common.unit.test.ts similarity index 100% rename from packages/transactions/src/coders/input.test.ts rename to packages/transactions/src/coders/input.common.unit.test.ts diff --git a/packages/transactions/src/coders/output.test.ts b/packages/transactions/src/coders/output.common.unit.test.ts similarity index 100% rename from packages/transactions/src/coders/output.test.ts rename to packages/transactions/src/coders/output.common.unit.test.ts diff --git a/packages/transactions/src/coders/receipt.test.ts b/packages/transactions/src/coders/receipt.common.unit.test.ts similarity index 100% rename from packages/transactions/src/coders/receipt.test.ts rename to packages/transactions/src/coders/receipt.common.unit.test.ts diff --git a/packages/transactions/src/coders/storage-slot.test.ts b/packages/transactions/src/coders/storage-slot.common.unit.test.ts similarity index 100% rename from packages/transactions/src/coders/storage-slot.test.ts rename to packages/transactions/src/coders/storage-slot.common.unit.test.ts diff --git a/packages/transactions/src/coders/transaction.test.ts b/packages/transactions/src/coders/transaction.common.unit.test.ts similarity index 100% rename from packages/transactions/src/coders/transaction.test.ts rename to packages/transactions/src/coders/transaction.common.unit.test.ts diff --git a/packages/transactions/src/coders/tx-pointer.test.ts b/packages/transactions/src/coders/tx-pointer.common.unit.test.ts similarity index 100% rename from packages/transactions/src/coders/tx-pointer.test.ts rename to packages/transactions/src/coders/tx-pointer.common.unit.test.ts diff --git a/packages/transactions/src/coders/utxo-id.test.ts b/packages/transactions/src/coders/utxo-id.common.unit.test.ts similarity index 100% rename from packages/transactions/src/coders/utxo-id.test.ts rename to packages/transactions/src/coders/utxo-id.common.unit.test.ts diff --git a/packages/transactions/src/coders/witness.test.ts b/packages/transactions/src/coders/witness.common.unit.test.ts similarity index 100% rename from packages/transactions/src/coders/witness.test.ts rename to packages/transactions/src/coders/witness.common.unit.test.ts diff --git a/packages/versions/src/cli.test.ts b/packages/versions/src/cli.node.unit.test.ts similarity index 100% rename from packages/versions/src/cli.test.ts rename to packages/versions/src/cli.node.unit.test.ts diff --git a/packages/versions/src/index.test.ts b/packages/versions/src/index.common.unit.test.ts similarity index 100% rename from packages/versions/src/index.test.ts rename to packages/versions/src/index.common.unit.test.ts diff --git a/packages/versions/src/lib/colorizeUserVersion.test.ts b/packages/versions/src/lib/colorizeUserVersion.node.unit.test.ts similarity index 100% rename from packages/versions/src/lib/colorizeUserVersion.test.ts rename to packages/versions/src/lib/colorizeUserVersion.node.unit.test.ts diff --git a/packages/versions/src/lib/compareUserVersions.test.ts b/packages/versions/src/lib/compareUserVersions.node.unit.test.ts similarity index 100% rename from packages/versions/src/lib/compareUserVersions.test.ts rename to packages/versions/src/lib/compareUserVersions.node.unit.test.ts diff --git a/packages/versions/src/lib/getSupportedVersions.test.ts b/packages/versions/src/lib/getSupportedVersions.node.unit.test.ts similarity index 100% rename from packages/versions/src/lib/getSupportedVersions.test.ts rename to packages/versions/src/lib/getSupportedVersions.node.unit.test.ts diff --git a/packages/versions/src/lib/getUserVersions.test.ts b/packages/versions/src/lib/getUserVersions.node.unit.test.ts similarity index 100% rename from packages/versions/src/lib/getUserVersions.test.ts rename to packages/versions/src/lib/getUserVersions.node.unit.test.ts diff --git a/packages/wallet-manager/src/storages/memory-storage.test.ts b/packages/wallet-manager/src/storages/memory-storage.common.unit.test.ts similarity index 100% rename from packages/wallet-manager/src/storages/memory-storage.test.ts rename to packages/wallet-manager/src/storages/memory-storage.common.unit.test.ts diff --git a/packages/wallet-manager/src/vaults/mnemonic-vault.test.ts b/packages/wallet-manager/src/vaults/mnemonic-vault.common.unit.test.ts similarity index 100% rename from packages/wallet-manager/src/vaults/mnemonic-vault.test.ts rename to packages/wallet-manager/src/vaults/mnemonic-vault.common.unit.test.ts diff --git a/packages/wallet-manager/src/vaults/privatekey-vault.test.ts b/packages/wallet-manager/src/vaults/privatekey-vault.common.unit.test.ts similarity index 100% rename from packages/wallet-manager/src/vaults/privatekey-vault.test.ts rename to packages/wallet-manager/src/vaults/privatekey-vault.common.unit.test.ts diff --git a/packages/wallet-manager/src/wallet-manager.test.ts b/packages/wallet-manager/src/wallet-manager.common.unit.test.ts similarity index 100% rename from packages/wallet-manager/src/wallet-manager.test.ts rename to packages/wallet-manager/src/wallet-manager.common.unit.test.ts diff --git a/packages/wallet/src/account.test.ts b/packages/wallet/src/account.common.e2e.test.ts similarity index 100% rename from packages/wallet/src/account.test.ts rename to packages/wallet/src/account.common.e2e.test.ts diff --git a/packages/wallet/src/transfer.test.ts b/packages/wallet/src/transfer.common.e2e.test.ts similarity index 100% rename from packages/wallet/src/transfer.test.ts rename to packages/wallet/src/transfer.common.e2e.test.ts diff --git a/packages/wallet/src/wallet-unlocked.test.ts b/packages/wallet/src/wallet-unlocked.common.e2e.test.ts similarity index 100% rename from packages/wallet/src/wallet-unlocked.test.ts rename to packages/wallet/src/wallet-unlocked.common.e2e.test.ts diff --git a/packages/wallet/src/wallet.test.ts b/packages/wallet/src/wallet.common.e2e.test.ts similarity index 100% rename from packages/wallet/src/wallet.test.ts rename to packages/wallet/src/wallet.common.e2e.test.ts diff --git a/packages/wordlists/src/wordlists.test.ts b/packages/wordlists/src/wordlists.common.unit.test.ts similarity index 100% rename from packages/wordlists/src/wordlists.test.ts rename to packages/wordlists/src/wordlists.common.unit.test.ts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 45afdc18e42..e3d0ebffe81 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,6 +39,7 @@ importers: npm-run-all: ^4.1.5 open: ^8.4.0 prettier: ^2.7.1 + puppeteer: ^19.6.2 shelljs: ^0.8.5 ts-generator: ^0.1.1 ts-jest: ^29.0.3 @@ -86,6 +87,7 @@ importers: npm-run-all: 4.1.5 open: 8.4.0 prettier: 2.8.0 + puppeteer: 19.6.2 shelljs: 0.8.5 ts-generator: 0.1.1 ts-jest: 29.0.3_n3m7ogz6hldwfud56c755ycyaq @@ -3151,6 +3153,14 @@ packages: '@types/yargs-parser': 21.0.0 dev: true + /@types/yauzl/2.10.0: + resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} + requiresBuild: true + dependencies: + '@types/node': 18.11.9 + dev: true + optional: true + /@typescript-eslint/eslint-plugin/5.44.0_fnsv2sbzcckq65bwfk7a5xwslu: resolution: {integrity: sha512-j5ULd7FmmekcyWeArx+i8x7sdRHzAtXTkmDPthE4amxZOWKFK7bomoJ4r7PJ8K7PoMzD16U8MmuZFAonr1ERvw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3750,6 +3760,10 @@ packages: node-int64: 0.4.0 dev: true + /buffer-crc32/0.2.13: + resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} + dev: true + /buffer-equal-constant-time/1.0.1: resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} dev: true @@ -3909,6 +3923,10 @@ packages: fsevents: 2.3.2 dev: true + /chownr/1.1.4: + resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} + dev: true + /ci-info/3.7.0: resolution: {integrity: sha512-2CpRNYmImPx+RXKLq6jko/L07phmS9I02TyqkcNU20GCF/GgaWvc58hPtjxDX8lPpkdwc9sNh72V9k00S7ezog==} engines: {node: '>=8'} @@ -4146,6 +4164,16 @@ packages: yaml: 1.10.2 dev: true + /cosmiconfig/8.0.0: + resolution: {integrity: sha512-da1EafcpH6b/TD8vDRaWV7xFINlHlF6zKsGwS1TsuVJTZRkquaS5HTMq7uq6h31619QjbsYl21gVDOm32KM1vQ==} + engines: {node: '>=14'} + dependencies: + import-fresh: 3.3.0 + js-yaml: 4.1.0 + parse-json: 5.2.0 + path-type: 4.0.0 + dev: true + /create-require/1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} dev: true @@ -4326,6 +4354,10 @@ packages: engines: {node: '>=8'} dev: true + /devtools-protocol/0.0.1082910: + resolution: {integrity: sha512-RqoZ2GmqaNxyx+99L/RemY5CkwG9D0WEfOKxekwCRXOGrDCep62ngezEJUVMq6rISYQ+085fJnWDQqGHlxVNww==} + dev: true + /diff-sequences/29.3.1: resolution: {integrity: sha512-hlM3QR272NXCi4pq+N4Kok4kOp6EsgOM3ZSpJI7Da3UAs+Ttsi8MRmB6trM/lhyzUxGfOgnpkHtgqm5Q/CTcfQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -4425,6 +4457,12 @@ packages: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} dev: true + /end-of-stream/1.4.4: + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + dependencies: + once: 1.4.0 + dev: true + /enquirer/2.3.6: resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} engines: {node: '>=8.6'} @@ -5166,6 +5204,20 @@ packages: resolution: {integrity: sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ==} engines: {node: ^10.17.0 || ^12.0.0 || >= 13.7.0} + /extract-zip/2.0.1: + resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} + engines: {node: '>= 10.17.0'} + hasBin: true + dependencies: + debug: 4.3.4 + get-stream: 5.2.0 + yauzl: 2.10.0 + optionalDependencies: + '@types/yauzl': 2.10.0 + transitivePeerDependencies: + - supports-color + dev: true + /fast-deep-equal/3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true @@ -5223,6 +5275,12 @@ packages: - encoding dev: true + /fd-slicer/1.1.0: + resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} + dependencies: + pend: 1.2.0 + dev: true + /figures/3.2.0: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} @@ -5299,6 +5357,10 @@ packages: web-streams-polyfill: 4.0.0-beta.3 dev: true + /fs-constants/1.0.0: + resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} + dev: true + /fs-extra/7.0.1: resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} engines: {node: '>=6 <7 || >=8'} @@ -5385,6 +5447,13 @@ packages: engines: {node: '>=10'} dev: true + /get-stream/5.2.0: + resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} + engines: {node: '>=8'} + dependencies: + pump: 3.0.0 + dev: true + /get-stream/6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} @@ -7105,6 +7174,10 @@ packages: engines: {node: '>= 8.0.0'} dev: true + /mkdirp-classic/0.5.3: + resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} + dev: true + /mkdirp/0.5.6: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true @@ -7503,6 +7576,10 @@ packages: engines: {node: '>=8'} dev: true + /pend/1.2.0: + resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} + dev: true + /picocolors/1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} dev: true @@ -7594,6 +7671,11 @@ packages: react-is: 18.2.0 dev: true + /progress/2.0.3: + resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} + engines: {node: '>=0.4.0'} + dev: true + /promise/7.3.1: resolution: {integrity: sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==} dependencies: @@ -7616,15 +7698,64 @@ packages: react-is: 16.13.1 dev: true + /proxy-from-env/1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + dev: true + /pseudomap/1.0.2: resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} dev: true + /pump/3.0.0: + resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + dependencies: + end-of-stream: 1.4.4 + once: 1.4.0 + dev: true + /punycode/2.1.1: resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} engines: {node: '>=6'} dev: true + /puppeteer-core/19.6.2: + resolution: {integrity: sha512-il7uK658MNC1FlxPABvcnv1RdpDa9CaBFHzvtEsl+9Y4tbAJKZurkegpcvWeIWcRYGiuBIVo+t+ZSh3G82CCjw==} + engines: {node: '>=14.1.0'} + dependencies: + cross-fetch: 3.1.5 + debug: 4.3.4 + devtools-protocol: 0.0.1082910 + extract-zip: 2.0.1 + https-proxy-agent: 5.0.1 + proxy-from-env: 1.1.0 + rimraf: 3.0.2 + tar-fs: 2.1.1 + unbzip2-stream: 1.4.3 + ws: 8.11.0 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - utf-8-validate + dev: true + + /puppeteer/19.6.2: + resolution: {integrity: sha512-Y5OAXXwXLfJYbl0dEFg8JKIhvCGxn+UYaBW9yra9ErmIhkVroDnYusM6oYxJCt/YIfC2pQWhvhxoZyf/E5fV6w==} + engines: {node: '>=14.1.0'} + requiresBuild: true + dependencies: + cosmiconfig: 8.0.0 + https-proxy-agent: 5.0.1 + progress: 2.0.3 + proxy-from-env: 1.1.0 + puppeteer-core: 19.6.2 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - utf-8-validate + dev: true + /pvtsutils/1.3.2: resolution: {integrity: sha512-+Ipe2iNUyrZz+8K/2IOo+kKikdtfhRKzNpQbruF2URmqPtoqAs8g3xS7TJvFF2GcPXjh7DkqMnpVveRFq4PgEQ==} dependencies: @@ -8271,6 +8402,26 @@ packages: tslib: 2.4.1 dev: true + /tar-fs/2.1.1: + resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} + dependencies: + chownr: 1.1.4 + mkdirp-classic: 0.5.3 + pump: 3.0.0 + tar-stream: 2.2.0 + dev: true + + /tar-stream/2.2.0: + resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} + engines: {node: '>=6'} + dependencies: + bl: 4.1.0 + end-of-stream: 1.4.4 + fs-constants: 1.0.0 + inherits: 2.0.4 + readable-stream: 3.6.0 + dev: true + /term-size/2.2.1: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} engines: {node: '>=8'} @@ -8728,6 +8879,13 @@ packages: which-boxed-primitive: 1.0.2 dev: true + /unbzip2-stream/1.4.3: + resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} + dependencies: + buffer: 5.7.1 + through: 2.3.8 + dev: true + /unc-path-regex/0.1.2: resolution: {integrity: sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==} engines: {node: '>=0.10.0'} @@ -9049,6 +9207,13 @@ packages: yargs-parser: 21.1.1 dev: true + /yauzl/2.10.0: + resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} + dependencies: + buffer-crc32: 0.2.13 + fd-slicer: 1.1.0 + dev: true + /yn/3.1.1: resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} engines: {node: '>=6'} diff --git a/setup-puppeteer.ts b/setup-puppeteer.ts new file mode 100644 index 00000000000..6c7ac4a5c3e --- /dev/null +++ b/setup-puppeteer.ts @@ -0,0 +1,12 @@ +import type { Browser } from 'puppeteer'; +import puppeteer from 'puppeteer'; + +let browser: Browser; + +beforeAll(async () => { + browser = await puppeteer.launch(); +}); + +afterAll(async () => { + await browser.close(); +});