Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement browser testing #1431

Closed
wants to merge 172 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
48cf64d
Setting up
arboleya Aug 26, 2023
845c7da
Adjusting tests from `packages/address`
arboleya Aug 26, 2023
ac93113
Adjusting tests from `packages/abi-typegen`
arboleya Aug 26, 2023
d99325e
Forgotten files
arboleya Aug 26, 2023
da2891a
Adjusting scripts
arboleya Aug 26, 2023
5744de1
Touchups
arboleya Aug 26, 2023
957d814
Adjusting script
arboleya Aug 26, 2023
67fb2ec
Touchups
arboleya Aug 26, 2023
23331d6
Adjusting tests for `packages/crypto`
arboleya Aug 27, 2023
e1e42fd
Adjusting tests for `packages/errors`
arboleya Aug 27, 2023
572b365
feat: implement coverage merging, reporting. Also in test workflow wi…
Sep 4, 2023
9878e46
feat: migration of functionalities from vitest
Sep 4, 2023
b39edfc
feat: further config change to implement vitest
Sep 4, 2023
9acc683
feat: some jest -> vitest syntax migration
Sep 4, 2023
e2c743c
feat: migrate jest spys to vite
Sep 5, 2023
52394ac
feat: add todo vitest mocks
Sep 5, 2023
9fa6e05
danielbate Sep 5, 2023
2018284
feat: upgrade lodash and ethers in hasher package
danielbate Sep 5, 2023
4683f34
feat: install buffer for tests
danielbate Sep 6, 2023
9f3b697
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Sep 6, 2023
149ba49
feat: add vite env and browser config
danielbate Sep 7, 2023
90a04de
Merge branch 'db/feat/implement-vitest' of https://github.com/FuelLab…
danielbate Sep 15, 2023
c927ced
chore: lint
danielbate Sep 15, 2023
aa44e62
feat: add missing test groups
danielbate Sep 16, 2023
5bbf912
feat: implement check tests module
danielbate Sep 16, 2023
2e4c7d6
chore: update lock file
danielbate Oct 2, 2023
c9eb247
feat: add missing test env tags
danielbate Oct 2, 2023
8526c0f
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Oct 2, 2023
8449d89
chore: regen lock file
danielbate Oct 2, 2023
d610c97
feat: migrate jest mocks to vite in providers
danielbate Oct 2, 2023
b69dafa
feat: add ts expect error for browser test for browser apis
danielbate Oct 2, 2023
52c8a33
feat: add missing vite restore mocks to provider test
danielbate Oct 2, 2023
eacf68b
feat: replace provider mocks with vite compatible mocks
danielbate Oct 2, 2023
dcb82ae
feat: reenable env specific tests
danielbate Oct 3, 2023
2ce501c
feat: enable ts dom lib
danielbate Oct 3, 2023
7dddd0b
efat: remove ts expect error for browser apis
danielbate Oct 3, 2023
7ee0785
feat: fallback to first faucet for vite env
danielbate Oct 3, 2023
94913c6
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Oct 6, 2023
a3e8f1e
feat: move vite config files to ts
danielbate Oct 9, 2023
b53f3d3
feat: polyfill node apis
danielbate Oct 10, 2023
30e8e54
feat: uninstall buffer in place of browser polyfill
danielbate Oct 11, 2023
bdc9ced
feat: remove node process import from vite env
danielbate Oct 11, 2023
c4615ae
feat: remove vi import from vite env
danielbate Oct 13, 2023
37c7cf8
feat: example commit with hasher hardlinked
danielbate Oct 13, 2023
3184325
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Oct 16, 2023
c480874
chore: regen lock file
danielbate Oct 16, 2023
111586e
feat: migrate all jest mocking and fix all node tests
danielbate Oct 16, 2023
14c4fe5
chore: remove redundant snapshots
danielbate Oct 16, 2023
4dfb63d
feat: add ts expect error for vite mocks
danielbate Oct 16, 2023
1d9b412
feat: add node group tags to all tests
danielbate Oct 18, 2023
a9f2333
feat: symlink fuels hasher deps
danielbate Oct 18, 2023
fb0f11f
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Oct 18, 2023
6575271
chore: regen lock file
danielbate Oct 18, 2023
6bbf9c9
feat: fix test groups
danielbate Oct 18, 2023
aba5c7e
feat: remove redundant process dep
danielbate Oct 18, 2023
fa67f72
feat: migrate to vite hooks in typegen test
danielbate Oct 18, 2023
d62716a
feat: alter coverage reporters
danielbate Oct 18, 2023
b3eaa28
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Oct 18, 2023
b8790e3
feat: add missing test group
danielbate Oct 18, 2023
79443ee
feat: reduce pnpm test commands and simplify test scripts
danielbate Oct 18, 2023
76c9dab
feat: remove browser test stage from test workflow
danielbate Oct 18, 2023
63c47c8
feat: implement browser test command
danielbate Oct 18, 2023
bb19f4b
feat: alter docs that reference jest
danielbate Oct 18, 2023
718c9ee
chore: changeset
danielbate Oct 18, 2023
ff5ee88
feat: fix doc snippets
danielbate Oct 18, 2023
87529aa
feat: don't run rewrite scripts inside vitest
danielbate Oct 18, 2023
4f49f90
feat: fix doc snippet tags
danielbate Oct 18, 2023
5df8e89
feat: add missing tsdoc files
danielbate Oct 18, 2023
dd3df95
feat: remove redundant imports
danielbate Oct 18, 2023
c29c9da
chore: linting
danielbate Oct 18, 2023
1f35487
feat: remove workflow from download artifact action in gh workflow
danielbate Oct 18, 2023
e1b3bfb
feat: alter test workflow
danielbate Oct 18, 2023
afd435c
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Oct 18, 2023
988769b
feat: add support for live node tests in vitest
danielbate Oct 18, 2023
3ffaf0e
feat: use different workflow download action
danielbate Oct 18, 2023
5c780c0
feat: fix check tests to find all tests
danielbate Oct 18, 2023
d322af1
Merge branch 'master' into db/feat/implement-vitest
danielbate Oct 19, 2023
9fdcb54
feat: migrate jest to vi in provider tests
danielbate Oct 19, 2023
80b6c99
feat: fix provider mock in provider unit test
danielbate Oct 19, 2023
a693d1e
feat: add e2e to all find tests flag
danielbate Oct 19, 2023
e22b143
feat: remove process define in place of polyfill plugin
danielbate Oct 19, 2023
a6c0d5a
feat: rename tests coverage script functions
danielbate Oct 19, 2023
17a527b
feat: fix vitest mock in mock versions test
danielbate Oct 19, 2023
6aba39a
feat: reintroduce hasher tests
danielbate Oct 19, 2023
4034447
feat: update test contribution docs
danielbate Oct 19, 2023
ecb5037
feat: rename coverage commands
danielbate Oct 19, 2023
86a7c63
Merge branch 'master' into db/feat/implement-vitest
danielbate Oct 20, 2023
76f9027
feat: add missing test groups
danielbate Oct 20, 2023
436e55b
chore: force rebuild
danielbate Oct 20, 2023
12093ca
feat: add test and coverage exclusions
danielbate Oct 23, 2023
ced206e
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Oct 23, 2023
45f738d
feat: reitroduce coverage flags
danielbate Oct 23, 2023
3e7f12d
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Oct 23, 2023
bd9e63c
feat: add missing test group
danielbate Oct 23, 2023
f367d46
feat: remove file from master merge
danielbate Oct 23, 2023
2727afb
feat: use more updated lcov workflow action
danielbate Oct 23, 2023
cbfdea6
chore: rebuild
danielbate Oct 23, 2023
7c7a46f
feat: use old coverage report action
danielbate Oct 24, 2023
48eec9b
feat: move test CI setup to a composite action
danielbate Oct 24, 2023
25d1cbc
feat: reimplement checkout to test CI
danielbate Oct 24, 2023
fec8684
feat: add shell to test setup CI action
danielbate Oct 24, 2023
778a98a
chore: force rebuild
danielbate Oct 24, 2023
a792a37
feat: fix test ci
danielbate Oct 24, 2023
429c48e
feat: create test setup action
danielbate Oct 24, 2023
066d591
feat: implement coverage diff script and PR comment action
danielbate Oct 24, 2023
f0fefc5
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Oct 24, 2023
357d81a
feat: resolve issue in previous merge conflict
danielbate Oct 24, 2023
6915a61
feat: add missing test envs
danielbate Oct 24, 2023
45f8a1f
feat: remove temp test ci stage
danielbate Oct 24, 2023
e5f1481
feat: alter find tests script to produce new diff
danielbate Oct 24, 2023
da21d01
feat: alter find tests script to produce new diff
danielbate Oct 24, 2023
de13d6b
feat: recreate coverage PR comment
danielbate Oct 25, 2023
ab0ccc7
feat: fix find test script
danielbate Oct 25, 2023
778ab06
Merge branch 'master' into db/feat/implement-vitest
danielbate Oct 25, 2023
d50ae80
Merge branch 'master' into db/feat/implement-vitest
danielbate Oct 26, 2023
064ea5e
Merge branch 'master' into db/feat/implement-vitest
arboleya Oct 28, 2023
4d225e5
Adjusting new tests (merged from master) to vite
arboleya Oct 28, 2023
67bf6f4
Adding missing test’s group tag
arboleya Oct 28, 2023
6d7cf24
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Nov 1, 2023
d3776d4
chore: regen lock file
danielbate Nov 1, 2023
0da5b7c
feat: restore contents of crypto
danielbate Nov 2, 2023
6056258
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Nov 2, 2023
36c2ff1
feat: fix crypto test mocks
danielbate Nov 2, 2023
a300aec
feat: fix shell js refactors
danielbate Nov 2, 2023
48c79aa
feat: implement filter tests command
danielbate Nov 2, 2023
79ba5ba
feat: isolate browser tests
danielbate Nov 2, 2023
9d702f6
feat: migrate test validate script to sh
danielbate Nov 2, 2023
34cf024
feat: remove browser test stages from test workflow
danielbate Nov 2, 2023
270ca18
feat: rename gen coverage script to merge coverage
danielbate Nov 2, 2023
9095349
feat: rollback crypto types change
danielbate Nov 2, 2023
37598ab
feat: fix browser types
danielbate Nov 2, 2023
ce44adf
feat: remove redundant test workflow step
danielbate Nov 2, 2023
85a79ca
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Nov 6, 2023
54431c5
chore: linting
danielbate Nov 6, 2023
e77b5b3
feat: add missing crypto tsdoc file
danielbate Nov 6, 2023
4128e4d
feat: improve test ci stage names
danielbate Nov 6, 2023
da241d6
feat: remove test that was brought in merge
danielbate Nov 6, 2023
f8e6dea
feat: migrate fuels cli work to vitest
danielbate Nov 6, 2023
ef8527e
chore: linting
danielbate Nov 6, 2023
a591573
feat: implement test matrix to speed up builds
danielbate Nov 6, 2023
d03f9ca
feat: rename test matrix stage
danielbate Nov 6, 2023
ea219a5
chore: linting
danielbate Nov 6, 2023
1b8b703
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Nov 10, 2023
b0407d0
Merging with master
arboleya Nov 10, 2023
405d8cb
Moving fixtures around
arboleya Nov 12, 2023
c5cf587
Revamping test utilities
arboleya Nov 12, 2023
b12bca8
Updating gitignore
arboleya Nov 12, 2023
a4d9b05
Re-stitching files for `build` command
arboleya Nov 12, 2023
098bb58
Re-stitching files for `dev` command
arboleya Nov 12, 2023
8efce05
Re-stitching core cli files
arboleya Nov 12, 2023
a8d8eed
Fixing broken mocks
arboleya Nov 12, 2023
892a5af
Refactoring all feature tests
arboleya Nov 12, 2023
e031b7a
Fixing all broken unit tests
arboleya Nov 12, 2023
1ca9c1f
Adding missing units
arboleya Nov 12, 2023
9130262
Re-enabling convenient html report generation
arboleya Nov 12, 2023
edfe677
Re-position flag appropriately
arboleya Nov 12, 2023
c68a994
Ensuring method interruption
arboleya Nov 12, 2023
bfd7a1a
Setting up cleanup hook
arboleya Nov 12, 2023
ebdeb13
Removing useless method call
arboleya Nov 12, 2023
ee1774a
Lintfix
arboleya Nov 12, 2023
eb7d594
Adjusting hook timing
arboleya Nov 13, 2023
76b41d3
Adding [missing] test group tag
arboleya Nov 13, 2023
4b67198
Adjusting mocks’ restoration
arboleya Nov 13, 2023
95cfa23
Lintfix
arboleya Nov 13, 2023
ec1879f
Merge branch 'master' into db/feat/implement-vitest
arboleya Nov 13, 2023
a60161e
Fixing tsconfig
arboleya Nov 13, 2023
334a59c
Fixing test mocks
arboleya Nov 13, 2023
f912eae
Lintfix
arboleya Nov 13, 2023
36745ed
feat: reintroduce browser config and support
danielbate Nov 13, 2023
e31ba8c
feat: improve browser test script
danielbate Nov 13, 2023
d171e8b
feat: remove redundant comment
danielbate Nov 13, 2023
5790a52
feat: update lock
danielbate Nov 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .changeset/rare-snails-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"docs": patch
---

Migrate from Jest to Vitest
2 changes: 1 addition & 1 deletion .github/actions/test-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ runs:

- name: Build
run: pnpm build
shell: bash
shell: bash
87 changes: 68 additions & 19 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ jobs:

test:
runs-on: ubuntu-latest
name: ${{ matrix.env }}
strategy:
fail-fast: false
matrix:
env: [node]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -38,40 +43,84 @@ jobs:
- name: Lint
run: pnpm lint

- name: Validate Tests
run: pnpm test:validate

- name: Run Tests - ${{ matrix.env }}
run: pnpm ci:test --${{ matrix.env }}

- name: Upload Coverage - ${{ matrix.env }}
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.env }}
path: coverage/environments/${{ matrix.env }}

report:
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: CI Setup
uses: ./.github/actions/test-setup

- name: Generate Coverage Directory
run: mkdir -p coverage/environments

- name: Download Coverage Artifact for Node Tests
uses: actions/download-artifact@v3
with:
name: node
path: coverage/environments

- name: Generate Coverage
run: pnpm test:coverage-merge

- name: Find PR Number
uses: jwalton/gh-find-current-pr@v1
id: findPr

- name: Run tests and collect coverage
if: ${{ !steps.findPr.outputs.number }}
run: pnpm ci:test -- --json --coverage --testLocationInResults --outputFile=report.master.json

- name: Upload coverage to Github artifacts
- name: Upload Master Coverage Artifact
uses: actions/upload-artifact@v3
if: ${{ !steps.findPr.outputs.number }}
with:
name: coverage-reports
path: report.master.json
name: coverage-master
path: coverage/report

- name: Download coverage artifact
- name: Download Master Coverage Artifact
uses: dawidd6/action-download-artifact@v2
if: ${{ steps.findPr.outputs.number }}
# TODO: Remove PR != check once #1310 has been merged
if: ${{ (steps.findPr.outputs.number) && (steps.findPr.outputs.number != 1310)}}
with:
workflow: test.yaml
branch: master
name: coverage-reports
path: coverage-reports
name: coverage-master
path: coverage-master

- name: Run tests and post reports to PR
uses: ArtiomTr/jest-coverage-report-action@v2
# TODO: Delete once #1310 has been merged
- name: Download Master Coverage Artifact (temporary)
uses: dawidd6/action-download-artifact@v2
if: ${{ (steps.findPr.outputs.number) && (steps.findPr.outputs.number == 1310)}}
with:
workflow: test.yaml
run_id: 6628340271
name: coverage-master
path: coverage-master

- name: Generate Coverage Diff
run: pnpm test:coverage-diff

- name: Report Coverage
uses: thollander/actions-comment-pull-request@v2
if: ${{ steps.findPr.outputs.number }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
package-manager: pnpm
annotations: failed-tests
test-script: pnpm ci:test
prnumber: ${{ steps.findPr.outputs.number }}
base-coverage-file: coverage-reports/report.master.json
filePath: coverage/report/coverage-diff.txt
pr_number: ${{ (steps.findPr.outputs.number) }}
comment_tag: diff
mode: recreate
create_if_not_exists: true

live-tests:
name: Run Live Tests
if: github.head_ref == 'changeset-release/master'
Expand Down
4 changes: 4 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "@istanbuljs/nyc-config-typescript",
"reporter": ["json-summary"]
}
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"recommendations": [
"orta.vscode-jest",
"ZixuanChen.vitest-explorer",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint"
]
Expand Down
22 changes: 0 additions & 22 deletions .vscode/launch.json

This file was deleted.

11 changes: 7 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,17 @@ And then run the tests in another terminal tab:
# run all tests
pnpm test

# run tests while passing other flags to sub-program
pnpm test -- --coverage --my-other-flag
# watch all tests
pnpm test:watch

# run tests for a specific package
pnpm test packages/my-desired-package
pnpm test:filter packages/my-desired-package

# run tests for a specific file
pnpm test packages/my-desired-package/src/my.test.ts
pnpm test:filter packages/my-desired-package/src/my.test.ts

# run tests while passing other flags to sub-program
pnpm test -- --coverage --my-other-flag
```

Or if you want to start a local Fuel-Core node and run all tests serially you can do:
Expand Down
4 changes: 4 additions & 0 deletions apps/demo-fuels/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ import { SampleAbi__factory } from './sway-programs-api';
import bytecode from './sway-programs-api/contracts/SampleAbi.hex';

let gasPrice: BN;

/**
* @group node
*/
describe('ExampleContract', () => {
beforeAll(async () => {
const provider = await Provider.create(FUEL_NETWORK_URL);
Expand Down
4 changes: 4 additions & 0 deletions apps/demo-fuels/tsdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
"extends": ["../../tsdoc.base.json"]
}
4 changes: 2 additions & 2 deletions apps/demo-typegen/contract/src/main.sw
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// #region Testing-with-jest-rust
// #region Testing-in-ts-rust
contract;

abi DemoContract {
Expand All @@ -10,4 +10,4 @@ impl DemoContract for Contract {
input
}
}
// #endregion Testing-with-jest-rust
// #endregion Testing-in-ts-rust
9 changes: 7 additions & 2 deletions apps/demo-typegen/src/demo.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// #region Testing-with-jest-ts
// #region Testing-in-ts-ts
import { safeExec } from '@fuel-ts/errors/test-utils';
import { generateTestWallet } from '@fuel-ts/wallet/test-utils';
import type { BN } from 'fuels';
Expand All @@ -8,11 +8,16 @@ import { DemoContractAbi__factory } from './generated-types';
import bytecode from './generated-types/DemoContractAbi.hex';

let gasPrice: BN;

/**
* @group node
*/
describe('ExampleContract', () => {
beforeAll(async () => {
const provider = await Provider.create(FUEL_NETWORK_URL);
({ minGasPrice: gasPrice } = provider.getGasConfig());
});

it('should return the input', async () => {
const provider = await Provider.create(FUEL_NETWORK_URL);
const wallet = await generateTestWallet(provider, [[500_000, BaseAssetId]]);
Expand Down Expand Up @@ -50,7 +55,7 @@ describe('ExampleContract', () => {
expect(value.toHex()).toEqual(toHex(1337));
});
});
// #endregion Testing-with-jest-ts
// #endregion Testing-in-ts-ts

it('should throw when simulating via contract factory with wallet with no resources', async () => {
const provider = await Provider.create(FUEL_NETWORK_URL);
Expand Down
4 changes: 4 additions & 0 deletions apps/demo-typegen/tsdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
"extends": ["../../tsdoc.base.json"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { BN, BaseAssetId } from 'fuels';
import { SnippetProjectEnum } from '../../../projects';
import { createAndDeployContractFromProject } from '../../utils';

/**
* @group node
*/
describe(__filename, () => {
let contract: Contract;
let provider: Provider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { FUEL_NETWORK_URL, Provider, WalletUnlocked } from 'fuels';
import { SnippetProjectEnum } from '../../../projects';
import { createAndDeployContractFromProject } from '../../utils';

/**
* @group node
*/
describe(__filename, () => {
let deployedContract: Contract;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { ContractFactory } from 'fuels';
import { getSnippetProjectArtifacts, SnippetProjectEnum } from '../../../projects';
import { getTestWallet } from '../../utils';

/**
* @group node
*/
describe(__filename, () => {
let wallet: WalletUnlocked;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { Wallet, BN, BaseAssetId, Provider, FUEL_NETWORK_URL } from 'fuels';
import { SnippetProjectEnum } from '../../../projects';
import { createAndDeployContractFromProject } from '../../utils';

/**
* @group node
*/
describe(__filename, () => {
let contract: Contract;
let provider: Provider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { BaseAssetId } from 'fuels';
import { SnippetProjectEnum } from '../../../projects';
import { createAndDeployContractFromProject } from '../../utils';

/**
* @group node
*/
describe(__filename, () => {
let contract: Contract;
let provider: Provider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { join } from 'path';
import { SnippetProjectEnum } from '../../../projects';
import { getTestWallet } from '../../utils';

/**
* @group node
*/
describe(__filename, () => {
let PRIVATE_KEY: string;
let projectsPath: string;
Expand Down
3 changes: 3 additions & 0 deletions apps/docs-snippets/src/guide/contracts/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import type { Contract } from 'fuels';
import { SnippetProjectEnum } from '../../../projects';
import { createAndDeployContractFromProject } from '../../utils';

/**
* @group node
*/
describe(__filename, () => {
let contract: Contract;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { BN, ContractFactory } from 'fuels';
import { getSnippetProjectArtifacts, SnippetProjectEnum } from '../../../projects';
import { getTestWallet } from '../../utils';

/**
* @group node
*/
describe(__filename, () => {
let wallet: WalletUnlocked;
let simpleToken: Contract;
Expand Down
3 changes: 3 additions & 0 deletions apps/docs-snippets/src/guide/contracts/logs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { BN } from 'fuels';
import { SnippetProjectEnum } from '../../../projects';
import { createAndDeployContractFromProject } from '../../utils';

/**
* @group node
*/
describe(__filename, () => {
let contract: Contract;
let provider: Provider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { ContractFactory, Contract } from 'fuels';
import { SnippetProjectEnum, getSnippetProjectArtifacts } from '../../../projects';
import { getTestWallet } from '../../utils';

/**
* @group node
*/
describe(__filename, () => {
let contract: Contract;
let contractId: AbstractAddress;
Expand Down
3 changes: 3 additions & 0 deletions apps/docs-snippets/src/guide/contracts/multicalls.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { BaseAssetId, BN, ContractFactory } from 'fuels';
import { getSnippetProjectArtifacts, SnippetProjectEnum } from '../../../projects';
import { getTestWallet } from '../../utils';

/**
* @group node
*/
describe(__filename, () => {
let echoContract: Contract;
let counterContract: Contract;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { BaseAssetId, Wallet, BN, Contract } from 'fuels';
import { SnippetProjectEnum, getSnippetProjectArtifacts } from '../../../projects';
import { createAndDeployContractFromProject } from '../../utils';

/**
* @group node
*/
describe(__filename, () => {
it('should successfully simulate contract call with forwarded amount', async () => {
const contract = await createAndDeployContractFromProject(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { BN } from 'fuels';
import { SnippetProjectEnum } from '../../../projects';
import { createAndDeployContractFromProject } from '../../utils';

/**
* @group node
*/
describe(__filename, () => {
let contract: Contract;
let provider: Provider;
Expand Down
3 changes: 3 additions & 0 deletions apps/docs-snippets/src/guide/predicates/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { FUEL_NETWORK_URL, Provider, Predicate } from 'fuels';

import { SnippetProjectEnum, getSnippetProjectArtifacts } from '../../../projects';

/**
* @group node
*/
describe(__filename, () => {
const { abiContents: jsonAbi, binHexlified: binary } = getSnippetProjectArtifacts(
SnippetProjectEnum.RETURN_TRUE_PREDICATE
Expand Down
Loading
Loading