Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock array inside an interface returns Proxy #49

Open
anrolmar opened this issue Dec 3, 2020 · 0 comments
Open

Mock array inside an interface returns Proxy #49

anrolmar opened this issue Dec 3, 2020 · 0 comments

Comments

@anrolmar
Copy link

anrolmar commented Dec 3, 2020

Hi, I want to mock this interface:

export interface FileRequest {
    readonly folder: string;
    readonly params: any[];
}

I do something like this:

const mockFileRequest = mock<FileRequest>({
        _id: FileRequestHelper.generateObjectID(),
        folder: 'mock-folder',
        params: [
          {
            param1: {
              param11: 'value11'
            }
          },
          {
            param2: {
              param21: 'value21'
            }
          }
        ]
      });

And when I want to see its content, I realize that params property has the type Proxy.

Any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant