You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS : Windows 10 Node.js version : v14.15.4 suitecloud-cli version : 1.1.2 Terminal/CMD tool : VSCodeTerminal
Describe the bug
running simple included jest test is quite slow, takes ~2.5-3 seconds (seems mainly just to startup of jest/runner itself, however the actual test execution is performed very quickly)
Started looking further into jest docs & issue, seems similar to described here: jestjs/jest#7963
Seems adding Jest Config option of testEnvironment change to 'node' improves performance by ~1.5 seconds
To Reproduce
Steps to reproduce the behavior:
Use suitecloud project:create command to create new SDF Project
Run npm run test to execute jest tests, in context of SDF Project
Performance is slow due to default testEnvironment including jsdom components, which should not be needed for SuiteScript testing? There may be other CLI or Config flags to also boost performance (admittedly I am not familiar with jest unit testing much at all, the testEnvironment just seemed like a simple one to verify)
Expected Behavior
Any Config or CLI options that are relevant for SuiteScript Unit Testing would ideally be included in this suitecloud unit-testing package (either coming from SuiteCloudJestConfiguration.build() automatically, or perhaps even just a suggestion in Unit Testing README of relevant additional flags to be added.
The text was updated successfully, but these errors were encountered:
Your environment
OS : Windows 10
Node.js version : v14.15.4
suitecloud-cli version : 1.1.2
Terminal/CMD tool : VSCodeTerminal
Describe the bug
running simple included jest test is quite slow, takes ~2.5-3 seconds (seems mainly just to startup of jest/runner itself, however the actual test execution is performed very quickly)
Started looking further into jest docs & issue, seems similar to described here: jestjs/jest#7963
Seems adding Jest Config option of testEnvironment change to 'node' improves performance by ~1.5 seconds
To Reproduce
Steps to reproduce the behavior:
suitecloud project:create
command to create new SDF Projectnpm run test
to execute jest tests, in context of SDF ProjecttestEnvironment : 'node'
to exports of jest.config.js https://jestjs.io/docs/en/configuration#testenvironment-stringActual Behavior
Performance is slow due to default testEnvironment including jsdom components, which should not be needed for SuiteScript testing? There may be other CLI or Config flags to also boost performance (admittedly I am not familiar with jest unit testing much at all, the testEnvironment just seemed like a simple one to verify)
Expected Behavior
Any Config or CLI options that are relevant for SuiteScript Unit Testing would ideally be included in this suitecloud unit-testing package (either coming from
SuiteCloudJestConfiguration.build()
automatically, or perhaps even just a suggestion in Unit Testing README of relevant additional flags to be added.The text was updated successfully, but these errors were encountered: