PHACDataHub / sci-portal

1 stars 0 forks source link

The unit tests should pass on Windows #309

Open seanpoulter-foci opened 1 month ago

seanpoulter-foci commented 1 month ago

This Issue tracks an upstream bug with Backstage that is causing the unit tests to fail on Windows.

The problem comes from this line https://github.com/backstage/backstage/blob/0c2e0e60e60d8719d05c9fd431107b65f7ab7699/plugins/scaffolder-node/src/actions/fetch.ts#L90:

    // Given baseUrl is "file:///C:/Users/..."
    const basePath = baseUrl.slice("file://".length);
    // => "/C:/Users/..."

This causes the srcDir to be C:\C:\Users\... which is not found and fails.

### Tasks
- [x] Skip the failing tests on Windows (#292)
- [x] Create a GitHub Issue for Backstage with a reproducible example/test
- [ ] Upgrade Backstage when the fix is in
- [ ] Remove the conditional tests
seanpoulter-foci commented 1 month ago

This has been documented in https://github.com/backstage/backstage/issues/25056.