Skip to content

Explore switching tests to @typescript/vfs #1891

Open
@bradzacher

Description

@bradzacher

https://www.npmjs.com/package/@typescript/vfs

TypeScript VFS
A Map based TypeScript Virtual File System.
Useful when you need to:

  • Run TypeScript in the browser
  • Run virtual TypeScript environments where files on disk aren't the source of truth

We have a lot of fixture files across our suite - some of which are used in a single test, some of which are shared across many tests.

In both cases, it can be a bit hard to reason about what's used where and what to do when you need a new fixture.

In one test suite, the test even makes use of temporary files to do its testing.

Setting up a VFS was always tempting to do, but too much overhead to setup and maintain.
Now with an official typescript maintained VFS, that bar is much lower.

A VFS could make the tests more isolated, and thus easier to understand, create and modify.

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuepackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginpackage: typescript-estreeIssues related to @typescript-eslint/typescript-estreepackage: utilsIssues related to the @typescript-eslint/utils packagetestsanything to do with testing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions