refactor: remove createScope helper

Drop the exported helper and finish migrating call sites. Revert incidental context/for/include/layout churn so behavior matches mainline aside from the removal. Trim duplicate e2e and heavy Object.prototype loops in registry tests.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Yang Jun
2026-05-14 14:39:57 +08:00
co-authored by Cursor
parent ac683a917b
commit 80da505608
13 changed files with 28 additions and 77 deletions
-5
View File
@@ -138,11 +138,6 @@ describe('Context', function () {
ctx.push({ foo: [] })
return expect(ctx.getSync(['foo', 'reduce'])).toEqual(undefined)
})
it('should return undefined for typical Object.prototype properties (e.g. constructor, valueOf)', function () {
ctx.push({ obj: {} })
expect(ctx.getSync(['obj', 'constructor'])).toEqual(undefined)
expect(ctx.getSync(['obj', 'valueOf'])).toEqual(undefined)
})
it('should return undefined for function prototype property', function () {
function Foo () {}
Foo.prototype.bar = 'BAR'