'memory' is already defined
This commit is contained in:
parent
918497c365
commit
4ee7b5f440
|
@ -6,25 +6,25 @@ describe('Memory Connector', function(){
|
|||
|
||||
// or create it using the standard
|
||||
// data source creation api
|
||||
var memory = loopback.createDataSource({
|
||||
memory = loopback.createDataSource({
|
||||
connector: loopback.Memory
|
||||
});
|
||||
|
||||
|
||||
// create a model using the
|
||||
// memory data source
|
||||
var properties = {
|
||||
name: String,
|
||||
price: Number
|
||||
};
|
||||
|
||||
|
||||
var Product = memory.createModel('product', properties);
|
||||
|
||||
|
||||
Product.create([
|
||||
{name: 'apple', price: 0.79},
|
||||
{name: 'pear', price: 1.29},
|
||||
{name: 'orange', price: 0.59},
|
||||
], count);
|
||||
|
||||
|
||||
function count() {
|
||||
Product.count(function (err, count) {
|
||||
assert.equal(count, 3);
|
||||
|
@ -32,4 +32,4 @@ describe('Memory Connector', function(){
|
|||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue