OpenFn / OpenFn/kit

replace mock-fs in unit tests

Open
#1,346 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
21
Forks
23
Avg merge
1d 22h
Merged PRs (30d)
17

Description

We have lots of problems coming out of mock-fs, particularly in the new node 24 world.

I'm currently adding fixes which mock out certain system paths and it's all pretty awkward.

It'll be a hard and painful process but I'd really like to rethink how we test against the file system.

Either we need a more robust mocking library or we should write to the acutal filesystem more

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the unit tests that use mock-fs and identify the system paths and Node 24 failures described in the issue. Compare the current mocking approach with writing to the actual filesystem or using a more robust library. Done means the test strategy is replaced or substantially rethought, with the affected tests passing reliably.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing-qa
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.