Skip to content

[TODO]: Investigate mockContext return value in packages/testing #356

@Tobbe

Description

@Tobbe

logic: Returns mockContext instead of creating a new proxy like the production version - this means the proxy target never changes, which could cause issues if tests expect context === setContext(newCtx)

export const setContext = (newContext: GlobalContext): GlobalContext => {
  mockContextStore.set('context', newContext)
  return newContext
}

Originally posted by @greptile-apps[bot] in #355 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions