Skip to content

Virtualising non-nx part of e2e tests #1223

@poltorak

Description

@poltorak

Current e2e setup

Currently e2e tests are set up in 2 different ways:

  1. simply copying files to some tmp folder and use it in e2e tests
  2. way is using nx devkit to create virtual tree of files structure and then write them.

Improving the copy method (1.)

Instead of keeping some initial file structure, copying, renaming and then removing we could virtualize it.

Create a framework-agnostic version of createTreeWithEmptyWorkspace, combine it even with the memfs library and achieve the same goal as with copying files, but faster.
That new method could take a JS Object which will be the desired file structure.

Potential issue might be that we're going to create and maintain similar method to the one already existing in nx/devkit. We do that to cut off nx dependency (aim is for the pure npm workspace tests).
By virtualizing we potentially get a huge impact on e2e execution speed.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions