-
Notifications
You must be signed in to change notification settings - Fork 1.4k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Introduce a TS SDK testing standard and approach #1043
Comments
Good stuff @danielbate! 🚀 Somewhat related, we also have this: We can resume the work on it now that #984 was merged. Here's the spec from the last attempt: |
Good point @arboleya! Will add a task for just that. |
Do you mean other than the #284? |
Apologies, I will not be writing any more issues but I will be using the above task list as a reference to track changes made to bring us closer to adhering to the above standards. So I just meant that I will add another task to the above list, that references #284. |
The above requires updating due to further developments, however this is a good classification from @arboleya that will insight the specification:
|
Here's how these tests could be spread in directories: <package-name>
├── src
│ ├── index.test.ts # This would be a unit
│ └── index.ts
└── test
├── e2e
├── feature
├── fixtures
├── integration
└── utils I ended up with It worked great, and I think all packages should segregate their tests. This goes back to maybe re-distributing all tests from inside
One thing that could work is:
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
As we approach mainnet, it is important we start to implement some stricter testing standards that ensures parity with the protocol/FuelVM and gives us the greatest level of confidence in the changes we are making as uptake in the SDK increases. Additionally, we can consolidate and structure our testing to give greater clarity as to what behaviours we are currently supporting. I would like to propose some MoSCoW testing standards as well as a roadmap of changes to bring the current SDK in line with the standards.
Where we are now
fuel-gauge
for feature and integration level testingforc
projects for testsProposed standards
utils
packagesGiven X, When Y, Then Z
- for unit tests onlywhen
andthen
are usually required as thegiven
is our service under test. We can then utilise theit()
syntax for unit tests andtest()
syntax for feature and integration tests)master
(coverage level TBD)Tasks (TBD)
browser compatibility
#284This should bring greater clarity to the behaviours supported by the SDK, give greater confidence in the quality of our tests and increase overall coverage as discussed in #753 . All standards and tasks are up for discussion and I would appreciate any insights 😃
The text was updated successfully, but these errors were encountered: