Skip to content
This repository was archived by the owner on Aug 13, 2021. It is now read-only.
This repository was archived by the owner on Aug 13, 2021. It is now read-only.

Error using sails-memory for tests #27

@adrdra

Description

@adrdra

Hi !

I'm trying to use sails-memory and Barrels to get some fixtures in my tests.

I have created a model called Source and I got a fixture with one source. I can see that the source is in the sails memory, so I want to get the data to test it. I do :

Source.findOne(1, function(err, source) { console.log(source)};

And I get this Error :

Message:
    TypeError: Cannot read property 'select' of undefined
  Stack:
    TypeError: Cannot read property 'select' of undefined
        at Object.module.exports.adapter.find (/home/adrdra/.../node_modules/sails-memory/lib/adapter.js:117:27)
        at module.exports.find (/home/adrdra/.../node_modules/waterline/lib/waterline/adapter/dql.js:120:13)
        at module.exports.findOne (/home/adrdra/...t/node_modules/waterline/lib/waterline/adapter/dql.js:163:10)

...

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