Skip to content

test(core): Add test to ensure Angular correctly detects paths when served from file system - #69221

Open
wartab wants to merge 1 commit into
angular:mainfrom
wartab:file-system-test
Open

test(core): Add test to ensure Angular correctly detects paths when served from file system#69221
wartab wants to merge 1 commit into
angular:mainfrom
wartab:file-system-test

Conversation

@wartab

@wartab wartab commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Related to #53547

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

Adds a test for #53547. I was asked to add one back then, but kind of forgot (better late than never). I think adding this regression test is important in an era where LLMs recklessly attempt to fix "vulnerabilities" for bug hunting bounties.

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe: Test

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

I'm not sure if

Object.defineProperty(doc, 'baseURI', {
  value: 'file:///C:/Users/Test/Somewhere(2)/',
  configurable: true,
});

is the most canonical way to do this, but baseURI is readonly, but this is ultimately how the local file path is exposed.

@pullapprove
pullapprove Bot requested a review from JeanMeche June 8, 2026 09:41
@angular-robot angular-robot Bot added the area: core Issues related to the framework runtime label Jun 8, 2026
@ngbot ngbot Bot added this to the Backlog milestone Jun 8, 2026

@JeanMeche JeanMeche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also take a look at the failing linting check ?

@wartab
wartab force-pushed the file-system-test branch from d5b0beb to 732af36 Compare June 9, 2026 08:13
…erved from file system

This test makes sure that when Angular is served from Electron or just from the file system that the router works correctly.
@JeanMeche JeanMeche added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants