Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

FILTER ignores variables from the context #115

@max-prtsr

Description

@max-prtsr
    const context = {
      prices: [
        { model: 'BMW', price: 60000 },
        { model: 'Audi', price: 50000 }
      ],
      selectedModel: 'BMW'
    }
    expect(axel.compile('FILTER(_.model = "BMW", prices)')(context)).toEqual([{ model: 'BMW', price: 60000 }])
    expect(axel.compile('FILTER(_.model = selectedModel, prices)')(context)).toEqual([{ model: 'BMW', price: 60000 }])

The first one works fine, the second doesn't work :(

What do I do wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions